Add test_default_value_attribute to about_hashes.rb

This commit is contained in:
interdictor
2020-05-21 22:45:22 +02:00
parent 7d152b8afc
commit e647408062

View File

@@ -113,4 +113,14 @@ class AboutHashes < Neo::Koan
assert_equal __(["dos"]), hash[:two]
assert_equal __([]), hash[:three]
end
def test_default_value_attribute
hash = Hash.new
assert_equal __(nil), hash[:some_key]
hash.default = 'peanut'
assert_equal __('peanut'), hash[:some_key]
end
end