diff options
-rw-r--r-- | test/ostruct/test_ostruct.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ostruct/test_ostruct.rb b/test/ostruct/test_ostruct.rb index 3917cc0417..0688d8950c 100644 --- a/test/ostruct/test_ostruct.rb +++ b/test/ostruct/test_ostruct.rb @@ -225,6 +225,11 @@ class TC_OpenStruct < Test::Unit::TestCase end end + def test_access_undefined + os = OpenStruct.new + assert_nil os.foo + end + def test_overriden_private_methods os = OpenStruct.new(puts: :foo, format: :bar) assert_equal(:foo, os.puts) |