aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2016-09-16 16:34:36 -0300
committerGitHub <noreply@github.com>2016-09-16 16:34:36 -0300
commit84650022d574d24d6adea6ad941ec3ca57d2a2f0 (patch)
tree07318ea156bb21b19042fe2bebc7a713ab0a02e7 /actionpack/test/dispatch
parentc5c1a29be7d435fe569c9e15c22db65768b50318 (diff)
parenta9aed2ac94d2e0d1a233a3c193985ae78d7e79e9 (diff)
downloadrails-84650022d574d24d6adea6ad941ec3ca57d2a2f0.tar.gz
rails-84650022d574d24d6adea6ad941ec3ca57d2a2f0.tar.bz2
rails-84650022d574d24d6adea6ad941ec3ca57d2a2f0.zip
Merge pull request #26516 from grosser/grosser/assert
improve error message when include assertions fail
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r--actionpack/test/dispatch/cookies_test.rb6
-rw-r--r--actionpack/test/dispatch/header_test.rb4
2 files changed, 5 insertions, 5 deletions
diff --git a/actionpack/test/dispatch/cookies_test.rb b/actionpack/test/dispatch/cookies_test.rb
index 38cf0a2346..6dcd62572a 100644
--- a/actionpack/test/dispatch/cookies_test.rb
+++ b/actionpack/test/dispatch/cookies_test.rb
@@ -68,7 +68,7 @@ class CookieJarTest < ActiveSupport::TestCase
def test_write_doesnt_set_a_nil_header
headers = {}
request.cookie_jar.write(headers)
- assert !headers.include?("Set-Cookie")
+ assert_not_includes headers, "Set-Cookie"
end
end
@@ -1115,11 +1115,11 @@ class CookiesTest < ActionController::TestCase
assert_equal "david", cookies[:user_name]
get :noop
- assert !@response.headers.include?("Set-Cookie")
+ assert_not_includes @response.headers, "Set-Cookie"
assert_equal "david", cookies[:user_name]
get :noop
- assert !@response.headers.include?("Set-Cookie")
+ assert_not_includes @response.headers, "Set-Cookie"
assert_equal "david", cookies[:user_name]
end
diff --git a/actionpack/test/dispatch/header_test.rb b/actionpack/test/dispatch/header_test.rb
index 374e618b42..6febd5cb68 100644
--- a/actionpack/test/dispatch/header_test.rb
+++ b/actionpack/test/dispatch/header_test.rb
@@ -76,9 +76,9 @@ class HeaderTest < ActiveSupport::TestCase
test "key?" do
assert @headers.key?("CONTENT_TYPE")
- assert @headers.include?("CONTENT_TYPE")
+ assert_includes @headers, "CONTENT_TYPE"
assert @headers.key?("Content-Type")
- assert @headers.include?("Content-Type")
+ assert_includes @headers, "Content-Type"
end
test "fetch with block" do