diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/yaml/test_dbm.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/yaml/test_dbm.rb b/test/yaml/test_dbm.rb index c90b46a263..15d441d23b 100644 --- a/test/yaml/test_dbm.rb +++ b/test/yaml/test_dbm.rb @@ -22,4 +22,25 @@ class TestYAMLDBM < Test::Unit::TestCase assert_equal "value", @dbm.delete("key") assert_nil @dbm["key"] end + + def test_each_value + @dbm["key1"] = "value1" + @dbm["key2"] = "value2" + @dbm.each_value do |value| + assert_match(/value[12]/, value) + end + end + + def test_values + @dbm["key1"] = "value1" + @dbm["key2"] = "value2" + @dbm.values.each do |value| + assert_match(/value[12]/, value) + end + end + + def test_shift + @dbm["key"] = "value" + assert_equal ["key", "value"], @dbm.shift + end end
\ No newline at end of file |
