class ShowExceptionsTest::Boomer
Public Instance Methods
call(env)
click to toggle source
# File actionpack/test/dispatch/show_exceptions_test.rb, line 7 def call(env) req = ActionDispatch::Request.new(env) case req.path when "/not_found" raise AbstractController::ActionNotFound when "/bad_params", "/bad_params.json" begin raise StandardError.new rescue raise ActionDispatch::Http::Parameters::ParseError end when "/method_not_allowed" raise ActionController::MethodNotAllowed, "PUT" when "/unknown_http_method" raise ActionController::UnknownHttpMethod when "/not_found_original_exception" begin raise AbstractController::ActionNotFound.new rescue raise ActionView::Template::Error.new("template") end else raise "puke!" end end