diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2015-12-11 14:11:15 -0200 |
---|---|---|
committer | Rafael França <rafaelmfranca@gmail.com> | 2015-12-11 14:11:15 -0200 |
commit | b0e5fc2737ed0b2f67f9b9538d01e084545493fd (patch) | |
tree | 4780e6d4f4467001787ca94b4e67b5cc43c5174c /actionpack/lib/action_dispatch/testing/assertions | |
parent | 8570c806bf6785bed657eb172ff2d0c795c98505 (diff) | |
parent | b24711621075350285fed67392720349722f4654 (diff) | |
download | rails-b0e5fc2737ed0b2f67f9b9538d01e084545493fd.tar.gz rails-b0e5fc2737ed0b2f67f9b9538d01e084545493fd.tar.bz2 rails-b0e5fc2737ed0b2f67f9b9538d01e084545493fd.zip |
Merge pull request #22514 from prathamesh-sonpatki/use-assert-over-assert-predicate
Use assert over assert_predicate in assert_response
Diffstat (limited to 'actionpack/lib/action_dispatch/testing/assertions')
-rw-r--r-- | actionpack/lib/action_dispatch/testing/assertions/response.rb | 2 |
1 files changed, 1 insertions, 1 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? |