aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorCarl Lerche <carllerche@mac.com>2010-04-30 16:40:42 -0700
committerCarl Lerche <carllerche@mac.com>2010-04-30 16:40:42 -0700
commit6c280f3398966ffba45069500ff43d632513fe44 (patch)
treeb05826e154f04707d0abeefcab1786109b46e6a8 /actionpack/test/controller
parent95c98799a4871fb3eb92729d0a3db72a823b070a (diff)
downloadrails-6c280f3398966ffba45069500ff43d632513fe44.tar.gz
rails-6c280f3398966ffba45069500ff43d632513fe44.tar.bz2
rails-6c280f3398966ffba45069500ff43d632513fe44.zip
RouteSet does not raise ActionController::RoutingError when no routes match anymore. Instead, it follows the X-Cascade convention. ShowExceptions checks for X-Cascade so that the routing error page can still be displayed.
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/rescue_test.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/actionpack/test/controller/rescue_test.rb b/actionpack/test/controller/rescue_test.rb
index dd991898a8..0f64b77647 100644
--- a/actionpack/test/controller/rescue_test.rb
+++ b/actionpack/test/controller/rescue_test.rb
@@ -326,7 +326,8 @@ class RescueTest < ActionController::IntegrationTest
end
test 'rescue routing exceptions' do
- @app = ActionDispatch::Rescue.new(SharedTestRoutes) do
+ raiser = proc { |env| raise ActionController::RoutingError, "Did not handle the request" }
+ @app = ActionDispatch::Rescue.new(raiser) do
rescue_from ActionController::RoutingError, lambda { |env| [200, {"Content-Type" => "text/html"}, ["Gotcha!"]] }
end
@@ -335,7 +336,8 @@ class RescueTest < ActionController::IntegrationTest
end
test 'unrescued exception' do
- @app = ActionDispatch::Rescue.new(SharedTestRoutes)
+ raiser = proc { |env| raise ActionController::RoutingError, "Did not handle the request" }
+ @app = ActionDispatch::Rescue.new(raiser)
assert_raise(ActionController::RoutingError) { get '/b00m' }
end