summaryrefslogtreecommitdiff
path: root/spec/ruby/core/module/initialize_copy_spec.rb
blob: 85f1bbeb1710d29ea53bda9fa7fa063d1788f03f (plain)
1
2
3
4
5
6
7
8
9
10
require File.expand_path('../../../spec_helper', __FILE__)

describe "Module#initialize_copy" do
  it "should retain singleton methods when duped" do
    mod = Module.new
    def mod.hello
    end
    mod.dup.methods(false).should == [:hello]
  end
end