diff options
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/test_process.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/test_process.rb b/actionpack/lib/action_controller/test_process.rb index 1fe38136fe..7458230d78 100644 --- a/actionpack/lib/action_controller/test_process.rb +++ b/actionpack/lib/action_controller/test_process.rb @@ -251,6 +251,14 @@ module Test end EOV end + + def follow_redirect + if @response.redirected_to[:controller] + raise "Can't follow redirects outside of current controller (#{@response.redirected_to[:controller]})" + end + + get(@response.redirected_to.delete(:action), @response.redirected_to) + end end end -end +end
\ No newline at end of file |