aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/hash_ext_test.rb
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2016-12-25 02:29:52 +0900
committerAkira Matsuda <ronnie@dio.jp>2016-12-25 02:29:52 +0900
commite8ba0c0f21e2660b90f872fa4595156ca6190c77 (patch)
treed7bbc63157a1658802183fde1427abf8b3a90aa2 /activesupport/test/core_ext/hash_ext_test.rb
parent9d9a4bd7cf75d378109d043fd1f466dc27416223 (diff)
downloadrails-e8ba0c0f21e2660b90f872fa4595156ca6190c77.tar.gz
rails-e8ba0c0f21e2660b90f872fa4595156ca6190c77.tar.bz2
rails-e8ba0c0f21e2660b90f872fa4595156ca6190c77.zip
"Use assert_nil if expecting nil. This will fail in minitest 6."
Diffstat (limited to 'activesupport/test/core_ext/hash_ext_test.rb')
-rw-r--r--activesupport/test/core_ext/hash_ext_test.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/activesupport/test/core_ext/hash_ext_test.rb b/activesupport/test/core_ext/hash_ext_test.rb
index 8b816b3aad..ff12632f84 100644
--- a/activesupport/test/core_ext/hash_ext_test.rb
+++ b/activesupport/test/core_ext/hash_ext_test.rb
@@ -390,8 +390,8 @@ class HashExtTest < ActiveSupport::TestCase
assert_equal 1, hash[:a]
assert_equal true, hash[:b]
assert_equal false, hash[:c]
- assert_equal nil, hash[:d]
- assert_equal nil, hash[:e]
+ assert_nil hash[:d]
+ assert_nil hash[:e]
end
def test_indifferent_reading_with_nonnil_default
@@ -404,7 +404,7 @@ class HashExtTest < ActiveSupport::TestCase
assert_equal 1, hash[:a]
assert_equal true, hash[:b]
assert_equal false, hash[:c]
- assert_equal nil, hash[:d]
+ assert_nil hash[:d]
assert_equal 1, hash[:e]
end
@@ -933,8 +933,8 @@ class HashExtTest < ActiveSupport::TestCase
extracted = original.extract!(:a, :x)
assert_equal expected, extracted
- assert_equal nil, extracted[:a]
- assert_equal nil, extracted[:x]
+ assert_nil extracted[:a]
+ assert_nil extracted[:x]
end
def test_indifferent_extract
@@ -1595,7 +1595,7 @@ class HashToXmlTest < ActiveSupport::TestCase
def test_should_return_nil_if_no_key_is_supplied
hash_wia = HashWithIndifferentAccess.new { 1 + 2 }
- assert_equal nil, hash_wia.default
+ assert_nil hash_wia.default
end
def test_should_use_default_value_for_unknown_key