aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-07-10 13:45:37 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-07-10 13:47:09 -0300
commitfabcdc711b582307cb2996d26e82eadf32eb35a1 (patch)
tree9610c83ba5adc89441c04548bfacd13fdb7a4511
parentebf8961182bdc8134cc4b21dfa46b909624b6126 (diff)
downloadrails-fabcdc711b582307cb2996d26e82eadf32eb35a1.tar.gz
rails-fabcdc711b582307cb2996d26e82eadf32eb35a1.tar.bz2
rails-fabcdc711b582307cb2996d26e82eadf32eb35a1.zip
Reuse the same test for HWIA reverse_merge!
-rw-r--r--activesupport/test/core_ext/hash_ext_test.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/activesupport/test/core_ext/hash_ext_test.rb b/activesupport/test/core_ext/hash_ext_test.rb
index febe41ec4d..663f782611 100644
--- a/activesupport/test/core_ext/hash_ext_test.rb
+++ b/activesupport/test/core_ext/hash_ext_test.rb
@@ -523,13 +523,11 @@ class HashExtTest < ActiveSupport::TestCase
assert_equal 5, merged[:b]
end
- def test_reverse_merge
+ def test_indifferent_reverse_merging
hash = HashWithIndifferentAccess.new key: :old_value
hash.reverse_merge! key: :new_value
assert_equal :old_value, hash[:key]
- end
- def test_indifferent_reverse_merging
hash = HashWithIndifferentAccess.new('some' => 'value', 'other' => 'value')
hash.reverse_merge!(:some => 'noclobber', :another => 'clobber')
assert_equal 'value', hash[:some]