diff options
author | Jamis Buck <jamis@37signals.com> | 2006-03-20 18:16:48 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2006-03-20 18:16:48 +0000 |
commit | b0189f3f2ffd9de95ba2332cdcfaf48d28081e18 (patch) | |
tree | e2983d4778346001f262b19fe2932ed1fce2bf5e /actionpack/lib/action_controller | |
parent | 49414750693a61ad078549b9edb5260f32f69561 (diff) | |
download | rails-b0189f3f2ffd9de95ba2332cdcfaf48d28081e18.tar.gz rails-b0189f3f2ffd9de95ba2332cdcfaf48d28081e18.tar.bz2 rails-b0189f3f2ffd9de95ba2332cdcfaf48d28081e18.zip |
Fix assert_redirected_to so it works with symbols
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4004 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/assertions.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/assertions.rb b/actionpack/lib/action_controller/assertions.rb index 2402e0941b..3fc65d5bd9 100644 --- a/actionpack/lib/action_controller/assertions.rb +++ b/actionpack/lib/action_controller/assertions.rb @@ -85,8 +85,8 @@ module Test #:nodoc: assert_equal(eurl, url, msg) if eurl && url assert_equal(epath, path, msg) if epath && path else - @response_diff = options.diff(@response.redirected_to) if @response.redirected_to - msg = build_message(message, "response is not a redirection to all of the options supplied (redirection is <?>), difference: <?>", + @response_diff = options.diff(@response.redirected_to) if options.is_a?(Hash) && @response.redirected_to.is_a?(Hash) + msg = build_message(message, "response is not a redirection to all of the options supplied (redirection is <?>)#{', difference: <?>' if @response_diff}", @response.redirected_to || @response.redirect_url, @response_diff) assert_block(msg) do |