diff options
author | José Valim <jose.valim@gmail.com> | 2011-12-16 09:29:37 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-12-16 10:45:59 +0100 |
commit | deef8dd68241cdb9826a2293bced5e2257ccea90 (patch) | |
tree | 08240789fde8372129737f2ef0f710ff9b9a9a44 /actionpack/test | |
parent | d1425725673b0172d6561adebaed017b51db9333 (diff) | |
download | rails-deef8dd68241cdb9826a2293bced5e2257ccea90.tar.gz rails-deef8dd68241cdb9826a2293bced5e2257ccea90.tar.bz2 rails-deef8dd68241cdb9826a2293bced5e2257ccea90.zip |
Extract the rendering of public exceptions pages into a Rack app.
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/abstract_unit.rb | 10 | ||||
-rw-r--r-- | actionpack/test/controller/show_exceptions_test.rb | 2 | ||||
-rw-r--r-- | actionpack/test/dispatch/show_exceptions_test.rb | 2 |
3 files changed, 3 insertions, 11 deletions
diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb index c95b8221a1..40ca23a39d 100644 --- a/actionpack/test/abstract_unit.rb +++ b/actionpack/test/abstract_unit.rb @@ -174,7 +174,7 @@ class ActionDispatch::IntegrationTest < ActiveSupport::TestCase def self.build_app(routes = nil) RoutedRackApp.new(routes || ActionDispatch::Routing::RouteSet.new) do |middleware| - middleware.use "ActionDispatch::ShowExceptions" + middleware.use "ActionDispatch::ShowExceptions", ActionDispatch::PublicExceptions.new("#{FIXTURE_LOAD_PATH}/public") middleware.use "ActionDispatch::DebugExceptions" middleware.use "ActionDispatch::Callbacks" middleware.use "ActionDispatch::ParamsParser" @@ -337,14 +337,6 @@ class Workshop end module ActionDispatch - class ShowExceptions - private - remove_method :public_path - def public_path - "#{FIXTURE_LOAD_PATH}/public" - end - end - class DebugExceptions private remove_method :stderr_logger diff --git a/actionpack/test/controller/show_exceptions_test.rb b/actionpack/test/controller/show_exceptions_test.rb index 2f5c268330..ba78559f31 100644 --- a/actionpack/test/controller/show_exceptions_test.rb +++ b/actionpack/test/controller/show_exceptions_test.rb @@ -2,7 +2,7 @@ require 'abstract_unit' module ShowExceptions class ShowExceptionsController < ActionController::Base - use ActionDispatch::ShowExceptions + use ActionDispatch::ShowExceptions, ActionDispatch::PublicExceptions.new("#{FIXTURE_LOAD_PATH}/public") use ActionDispatch::DebugExceptions before_filter :only => :another_boom do diff --git a/actionpack/test/dispatch/show_exceptions_test.rb b/actionpack/test/dispatch/show_exceptions_test.rb index 020cc80f3f..d3c99e4f31 100644 --- a/actionpack/test/dispatch/show_exceptions_test.rb +++ b/actionpack/test/dispatch/show_exceptions_test.rb @@ -18,7 +18,7 @@ class ShowExceptionsTest < ActionDispatch::IntegrationTest end end - ProductionApp = ActionDispatch::ShowExceptions.new(Boomer.new) + ProductionApp = ActionDispatch::ShowExceptions.new(Boomer.new, ActionDispatch::PublicExceptions.new("#{FIXTURE_LOAD_PATH}/public")) test 'skip diagnosis if not showing exceptions' do @app = ProductionApp |