aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/method/clone_spec.rb
blob: e3b40254f80fe4bcc135834716269b128c4f481f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../fixtures/classes', __FILE__)

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