aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/test_process.rb10
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