aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/lib/action_dispatch/testing/assertions/response.rb2
-rw-r--r--actionpack/test/assertions/response_assertions_test.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/testing/assertions/response.rb b/actionpack/lib/action_dispatch/testing/assertions/response.rb
index 5af052afb4..cc2a2fb119 100644
--- a/actionpack/lib/action_dispatch/testing/assertions/response.rb
+++ b/actionpack/lib/action_dispatch/testing/assertions/response.rb
@@ -31,7 +31,7 @@ module ActionDispatch
if Symbol === type
if [:success, :missing, :redirect, :error].include?(type)
- assert_predicate @response, RESPONSE_PREDICATES[type], message
+ assert @response.send(RESPONSE_PREDICATES[type]), message
else
code = Rack::Utils::SYMBOL_TO_STATUS_CODE[type]
if code.nil?
diff --git a/actionpack/test/assertions/response_assertions_test.rb b/actionpack/test/assertions/response_assertions_test.rb
index 6c7036aa1a..00fb1c0f12 100644
--- a/actionpack/test/assertions/response_assertions_test.rb
+++ b/actionpack/test/assertions/response_assertions_test.rb
@@ -70,8 +70,8 @@ module ActionDispatch
assert_response :success
end
- expected = "Expected response to be a <success>, but was a redirect to <http://test.host/posts/redirect/1>."
- assert_match expected, error.message
+ expected = "Expected response to be a <success>, but was a redirect to <http://test.host/posts/redirect/1>"
+ assert_equal expected, error.message
end
end
end