diff options
author | Chris Hapgood <cch1@hapgoods.com> | 2009-11-04 10:13:59 -0500 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2009-11-05 21:17:13 +1300 |
commit | 6c59e5a558922b8f4084533071c3d93e151858ac (patch) | |
tree | 21827e48685039c4e34fd13a2bdef967983ba416 /activesupport/test | |
parent | a8ed10546d844fc15d87f5c8f168a18d0cdab5f0 (diff) | |
download | rails-6c59e5a558922b8f4084533071c3d93e151858ac.tar.gz rails-6c59e5a558922b8f4084533071c3d93e151858ac.tar.bz2 rails-6c59e5a558922b8f4084533071c3d93e151858ac.zip |
Fix OrderedHash#replace
Signed-off-by: Michael Koziarski <michael@koziarski.com>
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/ordered_hash_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activesupport/test/ordered_hash_test.rb b/activesupport/test/ordered_hash_test.rb index 15bd57181f..1521279437 100644 --- a/activesupport/test/ordered_hash_test.rb +++ b/activesupport/test/ordered_hash_test.rb @@ -191,4 +191,11 @@ class OrderedHashTest < Test::Unit::TestCase assert_equal "odd number of arguments for Hash", $!.message end end + + def test_replace_updates_keys + @other_ordered_hash = ActiveSupport::OrderedHash[:black, '000000', :white, '000000'] + original = @ordered_hash.replace(@other_ordered_hash) + assert_same original, @ordered_hash + assert_equal @other_ordered_hash.keys, @ordered_hash.keys + end end |