Sha256: c129aa15168d730b7cb7ad0da9fca756549f60a2845aeec8679a7dc9be813860
Contents?: true
Size: 571 Bytes
Versions: 48
Compression:
Stored size: 571 Bytes
Contents
describe "Module#module_function with specific method names" do it "creates duplicates of the given instance methods on the Module object" do m = Module.new do def test() end def test2() end def test3() end module_function :test, :test2 end m.respond_to?(:test).should == true m.respond_to?(:test2).should == true m.respond_to?(:test3).should == false end it "returns the current module" do x = nil m = Module.new do def test() end x = module_function :test end x.should == m end end
Version data entries
48 entries across 48 versions & 3 rubygems