aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext
diff options
context:
space:
mode:
authorDavid Cornu <davidjcornu@gmail.com>2015-02-11 21:49:09 +0000
committerDavid Cornu <davidjcornu@gmail.com>2016-01-07 15:39:36 -0500
commit38a990237a0f99d99b885ea6570cae3752138a29 (patch)
treec4c4d5fe1bff0b326392a530571d4488721fa7d9 /activesupport/test/core_ext
parentb4f28dbb39f29fcb0b0393b26ef31f1f6fbe0679 (diff)
downloadrails-38a990237a0f99d99b885ea6570cae3752138a29.tar.gz
rails-38a990237a0f99d99b885ea6570cae3752138a29.tar.bz2
rails-38a990237a0f99d99b885ea6570cae3752138a29.zip
Match HashWithIndifferentAccess#default's behaviour with Hash#default
Diffstat (limited to 'activesupport/test/core_ext')
-rw-r--r--activesupport/test/core_ext/hash_ext_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/test/core_ext/hash_ext_test.rb b/activesupport/test/core_ext/hash_ext_test.rb
index 2119352df0..1b66f784e4 100644
--- a/activesupport/test/core_ext/hash_ext_test.rb
+++ b/activesupport/test/core_ext/hash_ext_test.rb
@@ -1587,9 +1587,9 @@ class HashToXmlTest < ActiveSupport::TestCase
assert_equal 3, hash_wia[:new_key]
end
- def test_should_use_default_proc_if_no_key_is_supplied
+ def test_should_return_nil_if_no_key_is_supplied
hash_wia = HashWithIndifferentAccess.new { 1 + 2 }
- assert_equal 3, hash_wia.default
+ assert_equal nil, hash_wia.default
end
def test_should_use_default_value_for_unknown_key