[ruby/ostruct] Add really basic test that was missing

This commit is contained in:
Marc-Andre Lafortune 2020-09-08 15:51:27 -04:00
parent e026e186f4
commit 5e7ec05319

View File

@ -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)