From 2ab2077235308aaa82dc430f1da8d6519fb7dac0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sat, 3 Dec 2011 11:38:25 +0100 Subject: Fix failing cascade exception. --- actionpack/test/dispatch/debug_exceptions_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'actionpack/test/dispatch') diff --git a/actionpack/test/dispatch/debug_exceptions_test.rb b/actionpack/test/dispatch/debug_exceptions_test.rb index e6c0a06878..f7411c7729 100644 --- a/actionpack/test/dispatch/debug_exceptions_test.rb +++ b/actionpack/test/dispatch/debug_exceptions_test.rb @@ -11,6 +11,8 @@ class DebugExceptionsTest < ActionDispatch::IntegrationTest env['action_dispatch.show_detailed_exceptions'] = @detailed req = ActionDispatch::Request.new(env) case req.path + when "/pass" + [404, { "X-Cascade" => "pass" }, []] when "/not_found" raise ActionController::UnknownAction when "/runtime_error" @@ -46,6 +48,13 @@ class DebugExceptionsTest < ActionDispatch::IntegrationTest end end + test 'raise an exception on cascade pass' do + @app = ProductionApp + assert_raise ActionController::RoutingError do + get "/pass", {}, {'action_dispatch.show_exceptions' => true} + end + end + test "rescue with diagnostics message" do @app = DevelopmentApp -- cgit v1.2.3