Merge pull request #15 from Interdictor/master

Add test_default_value_attribute to about_hashes.rb
This commit is contained in:
Tony Schneider
2023-08-09 00:32:38 -04:00
committed by GitHub

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