diff options
author | Michael Koziarski <michael@koziarski.com> | 2008-05-06 20:53:56 +1200 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-05-06 20:53:56 +1200 |
commit | a08004a9a7d4c93c39f9693f6406ecb70d6a38c0 (patch) | |
tree | 531584bf588a3b288ab14a8e16540ab947a0ec45 /activesupport/test/ordered_options_test.rb | |
parent | c26d10563eaa29961ae895a9fbe3afae7d24a9b1 (diff) | |
parent | 04f52219f11944e50555dc59917c73c99581dac0 (diff) | |
download | rails-a08004a9a7d4c93c39f9693f6406ecb70d6a38c0.tar.gz rails-a08004a9a7d4c93c39f9693f6406ecb70d6a38c0.tar.bz2 rails-a08004a9a7d4c93c39f9693f6406ecb70d6a38c0.zip |
Merge branch 'master' of git@github.com:rails/rails
Diffstat (limited to 'activesupport/test/ordered_options_test.rb')
-rw-r--r-- | activesupport/test/ordered_options_test.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/activesupport/test/ordered_options_test.rb b/activesupport/test/ordered_options_test.rb index 1a1d0c7648..3d537a0ae4 100644 --- a/activesupport/test/ordered_options_test.rb +++ b/activesupport/test/ordered_options_test.rb @@ -29,6 +29,19 @@ class OrderedHashTest < Test::Unit::TestCase assert_equal value, @ordered_hash.values.last assert_equal value, @ordered_hash[key] end + + def test_delete + key, value = 'white', 'ffffff' + bad_key = 'black' + + @ordered_hash[key] = value + assert_equal @keys.length + 1, @ordered_hash.length + + assert_equal value, @ordered_hash.delete(key) + assert_equal @keys.length, @ordered_hash.length + + assert_nil @ordered_hash.delete(bad_key) + end end class OrderedOptionsTest < Test::Unit::TestCase |