diff options
author | Akira Matsuda <ronnie@dio.jp> | 2016-12-25 02:29:52 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2016-12-25 02:29:52 +0900 |
commit | e8ba0c0f21e2660b90f872fa4595156ca6190c77 (patch) | |
tree | d7bbc63157a1658802183fde1427abf8b3a90aa2 /railties/test/application | |
parent | 9d9a4bd7cf75d378109d043fd1f466dc27416223 (diff) | |
download | rails-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 'railties/test/application')
-rw-r--r-- | railties/test/application/assets_test.rb | 2 | ||||
-rw-r--r-- | railties/test/application/configuration/custom_test.rb | 2 | ||||
-rw-r--r-- | railties/test/application/configuration_test.rb | 6 | ||||
-rw-r--r-- | railties/test/application/middleware_test.rb | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/railties/test/application/assets_test.rb b/railties/test/application/assets_test.rb index edd43503bf..f38cacd6da 100644 --- a/railties/test/application/assets_test.rb +++ b/railties/test/application/assets_test.rb @@ -384,7 +384,7 @@ module ApplicationTests get "/assets/demo.js" assert_match "alert()", last_response.body - assert_equal nil, last_response.headers["Set-Cookie"] + assert_nil last_response.headers["Set-Cookie"] end test "files in any assets/ directories are not added to Sprockets" do diff --git a/railties/test/application/configuration/custom_test.rb b/railties/test/application/configuration/custom_test.rb index 13fc98f0d6..3c675eec71 100644 --- a/railties/test/application/configuration/custom_test.rb +++ b/railties/test/application/configuration/custom_test.rb @@ -28,7 +28,7 @@ module ApplicationTests assert_equal 3, x.payment_processing.retries assert_equal true, x.super_debugger assert_equal false, x.hyper_debugger - assert_equal nil, x.nil_debugger + assert_nil x.nil_debugger assert_nil x.i_do_not_exist.zomg end diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index c409f1ea79..31c3b5cf52 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -614,7 +614,7 @@ module ApplicationTests app "development" assert_equal "b3c631c314c0bbca50c1b2843150fe33", app.config.secret_token - assert_equal nil, app.secrets.secret_key_base + assert_nil app.secrets.secret_key_base assert_equal app.key_generator.class, ActiveSupport::LegacyKeyGenerator end @@ -630,7 +630,7 @@ module ApplicationTests app "development" assert_equal "", app.config.secret_token - assert_equal nil, app.secrets.secret_key_base + assert_nil app.secrets.secret_key_base assert_raise ArgumentError, /\AA secret is required/ do app.key_generator end @@ -1204,7 +1204,7 @@ module ApplicationTests application.config.session_store :disabled end - assert_equal nil, app.config.session_store + assert_nil app.config.session_store end test "default session store initializer sets session store to cookie store" do diff --git a/railties/test/application/middleware_test.rb b/railties/test/application/middleware_test.rb index 9baf7360a5..be41dcb299 100644 --- a/railties/test/application/middleware_test.rb +++ b/railties/test/application/middleware_test.rb @@ -246,7 +246,7 @@ module ApplicationTests get "/", {}, "HTTP_IF_NONE_MATCH" => etag assert_equal 304, last_response.status assert_equal "", last_response.body - assert_equal nil, last_response.headers["Content-Type"] + assert_nil last_response.headers["Content-Type"] assert_equal "max-age=0, private, must-revalidate", last_response.headers["Cache-Control"] assert_equal etag, last_response.headers["Etag"] @@ -255,7 +255,7 @@ module ApplicationTests assert_equal "", last_response.body assert_equal "text/plain; charset=utf-8", last_response.headers["Content-Type"] assert_equal "no-cache", last_response.headers["Cache-Control"] - assert_equal nil, last_response.headers["Etag"] + assert_nil last_response.headers["Etag"] end test "ORIGINAL_FULLPATH is passed to env" do |