summaryrefslogtreecommitdiff
path: root/spec/ruby/core/method/clone_spec.rb
blob: 3fe4000fb798d7e34fc91ce4289e2fe34c8fcadf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require_relative '../../spec_helper'
require_relative 'fixtures/classes'

describe "Method#clone" do
  it "returns a copy of the method" do
    m1 = MethodSpecs::Methods.new.method(:foo)
    m2 = m1.clone

    m1.should == m2
    m1.should_not equal(m2)

    m1.call.should == m2.call
  end
end