aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/testing/assertions
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2012-01-06 11:34:11 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2012-01-06 11:34:11 -0800
commita0bab371ae30d78ed3eb4df3c516e6b798e801ad (patch)
tree632014897d3035189c464e25597cc9914556d0d0 /actionpack/lib/action_dispatch/testing/assertions
parentd28a15ede59f6434f1b7a8d01be060fa73b4746c (diff)
downloadrails-a0bab371ae30d78ed3eb4df3c516e6b798e801ad.tar.gz
rails-a0bab371ae30d78ed3eb4df3c516e6b798e801ad.tar.bz2
rails-a0bab371ae30d78ed3eb4df3c516e6b798e801ad.zip
Just use assert_equal
Diffstat (limited to 'actionpack/lib/action_dispatch/testing/assertions')
-rw-r--r--actionpack/lib/action_dispatch/testing/assertions/response.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/testing/assertions/response.rb b/actionpack/lib/action_dispatch/testing/assertions/response.rb
index a9943e7afc..094cfbfc76 100644
--- a/actionpack/lib/action_dispatch/testing/assertions/response.rb
+++ b/actionpack/lib/action_dispatch/testing/assertions/response.rb
@@ -62,9 +62,8 @@ module ActionDispatch
redirect_is = normalize_argument_to_redirection(@response.location)
redirect_expected = normalize_argument_to_redirection(options)
- if redirect_is != redirect_expected
- flunk "Expected response to be a redirect to <#{redirect_expected}> but was a redirect to <#{redirect_is}>"
- end
+ message ||= "Expected response to be a redirect to <#{redirect_expected}> but was a redirect to <#{redirect_is}>"
+ assert_equal redirect_expected, redirect_is, message
end
private