diff options
Diffstat (limited to 'test/ostruct/test_ostruct.rb')
-rw-r--r-- | test/ostruct/test_ostruct.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ostruct/test_ostruct.rb b/test/ostruct/test_ostruct.rb index 0688d8950c..3c934ccbec 100644 --- a/test/ostruct/test_ostruct.rb +++ b/test/ostruct/test_ostruct.rb @@ -235,4 +235,10 @@ class TC_OpenStruct < Test::Unit::TestCase assert_equal(:foo, os.puts) assert_equal(:bar, os.format) end + + def test_overriden_public_methods + os = OpenStruct.new(method: :foo, class: :bar) + assert_equal(:foo, os.method) + assert_equal(:bar, os.class) + end end |