diff options
Diffstat (limited to 'test/ostruct/test_ostruct.rb')
-rw-r--r-- | test/ostruct/test_ostruct.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/ostruct/test_ostruct.rb b/test/ostruct/test_ostruct.rb index 831598086d..3917cc0417 100644 --- a/test/ostruct/test_ostruct.rb +++ b/test/ostruct/test_ostruct.rb @@ -179,7 +179,6 @@ class TC_OpenStruct < Test::Unit::TestCase def test_accessor_defines_method os = OpenStruct.new(foo: 42) assert_respond_to(os, :foo) - assert_equal([], os.singleton_methods) assert_equal(42, os.foo) assert_equal([:foo, :foo=], os.singleton_methods.sort) end @@ -225,4 +224,10 @@ class TC_OpenStruct < Test::Unit::TestCase os.foo true, true end end + + def test_overriden_private_methods + os = OpenStruct.new(puts: :foo, format: :bar) + assert_equal(:foo, os.puts) + assert_equal(:bar, os.format) + end end |