diff options
author | Marc-Andre Lafortune <github@marc-andre.ca> | 2020-09-08 15:51:27 -0400 |
---|---|---|
committer | Marc-Andre Lafortune <github@marc-andre.ca> | 2020-09-14 12:46:43 -0400 |
commit | 5e7ec0531987bfff65f65db9d491c272abb4add1 (patch) | |
tree | 5a2a66fd8d984ca6b83962d62e9d6991df608b76 /test | |
parent | e026e186f4a01aa3f6cd02ae6ef33f44f129361c (diff) | |
download | ruby-5e7ec0531987bfff65f65db9d491c272abb4add1.tar.gz |
[ruby/ostruct] Add really basic test that was missing
Diffstat (limited to 'test')
-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) |