diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2014-05-13 10:52:40 +0100 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2014-05-13 10:52:40 +0100 |
commit | b95ac8a20b9764c9736046eb86e7ae1b6082d65a (patch) | |
tree | df2cde8c7c612eae210a6ce2520ff906c8fb5f6e /actionpack/lib | |
parent | fd6d6dc6024adb77be92f9ef7d13dbf5722c1770 (diff) | |
parent | 7ec665303d125c945f7d59affb904f974143a087 (diff) | |
download | rails-b95ac8a20b9764c9736046eb86e7ae1b6082d65a.tar.gz rails-b95ac8a20b9764c9736046eb86e7ae1b6082d65a.tar.bz2 rails-b95ac8a20b9764c9736046eb86e7ae1b6082d65a.zip |
Merge pull request #15084 from arthurnn/fix_assert_redirected_to
Fix regression on `assert_redirected_to`.
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/testing/assertions/response.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/testing/assertions/response.rb b/actionpack/lib/action_dispatch/testing/assertions/response.rb index 68feb26936..0adc6c84ff 100644 --- a/actionpack/lib/action_dispatch/testing/assertions/response.rb +++ b/actionpack/lib/action_dispatch/testing/assertions/response.rb @@ -73,7 +73,13 @@ module ActionDispatch if Regexp === fragment fragment else - @controller._compute_redirect_to_location(fragment) + handle = @controller || Class.new(ActionController::Metal) do + include ActionController::Redirecting + def initialize(request) + @_request = request + end + end.new(@request) + handle._compute_redirect_to_location(fragment) end end end |