summaryrefslogtreecommitdiff
path: root/test/ostruct/test_ostruct.rb
diff options
context:
space:
mode:
authorMarc-Andre Lafortune <github@marc-andre.ca>2020-09-08 15:51:27 -0400
committerMarc-Andre Lafortune <github@marc-andre.ca>2020-09-14 12:46:43 -0400
commit5e7ec0531987bfff65f65db9d491c272abb4add1 (patch)
tree5a2a66fd8d984ca6b83962d62e9d6991df608b76 /test/ostruct/test_ostruct.rb
parente026e186f4a01aa3f6cd02ae6ef33f44f129361c (diff)
[ruby/ostruct] Add really basic test that was missing
Diffstat (limited to 'test/ostruct/test_ostruct.rb')
-rw-r--r--test/ostruct/test_ostruct.rb5
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)