diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-10-16 05:07:23 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-10-16 05:07:23 +0000 |
commit | 5cb6a9aabdd2d74b7c8b52828f6b4797714ce78b (patch) | |
tree | 1b9b3536354a9afb6c141ae1ffa35fef8c6af957 /actionpack/lib | |
parent | cfe36d16097ba6c4e64d91026aef02bca25f73db (diff) | |
download | rails-5cb6a9aabdd2d74b7c8b52828f6b4797714ce78b.tar.gz rails-5cb6a9aabdd2d74b7c8b52828f6b4797714ce78b.tar.bz2 rails-5cb6a9aabdd2d74b7c8b52828f6b4797714ce78b.zip |
Improve the error message for assert_redirected_to. Closes #7337 [mikong, sandofsky]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7934 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/assertions/response_assertions.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/assertions/response_assertions.rb b/actionpack/lib/action_controller/assertions/response_assertions.rb index 4108695f07..09fb4f9a1b 100644 --- a/actionpack/lib/action_controller/assertions/response_assertions.rb +++ b/actionpack/lib/action_controller/assertions/response_assertions.rb @@ -79,9 +79,8 @@ module ActionController url[key] = value end - @response_diff = url[:expected].diff(url[:actual]) if url[:actual] - msg = build_message(message, "response is not a redirection to all of the options supplied (redirection is <?>), difference: <?>", - url[:actual], @response_diff) + @response_diff = url[:actual].diff(url[:expected]) if url[:actual] + msg = build_message(message, "expected a redirect to <?>, found one to <?>, a difference of <?> ", url[:expected], url[:actual], @response_diff) assert_block(msg) do url[:expected].keys.all? do |k| |