aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/abstract_unit.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-12-01 21:18:47 +0100
committerJosé Valim <jose.valim@gmail.com>2011-12-01 21:18:47 +0100
commit07f90f6bec702a6e08d65a33682ddd244050375f (patch)
treeeb76e17734ae44e08a75b8d74740e6e600422ae6 /actionpack/test/abstract_unit.rb
parent83d29a283ceb13ff431da535e8cc35db6828016c (diff)
parent6a4606d3a64e60189ea4ba5243830dcd97e6de14 (diff)
downloadrails-07f90f6bec702a6e08d65a33682ddd244050375f.tar.gz
rails-07f90f6bec702a6e08d65a33682ddd244050375f.tar.bz2
rails-07f90f6bec702a6e08d65a33682ddd244050375f.zip
Merge branch 'exceptions' with the following features:
* A Railtie API for registering new exceptions and their respective status code (check Active Record railtie for an example) * Extraction of ShowExceptions middleware logging and debugging features into a middleware called DebugExceptions Conflicts: actionpack/CHANGELOG.md
Diffstat (limited to 'actionpack/test/abstract_unit.rb')
-rw-r--r--actionpack/test/abstract_unit.rb22
1 files changed, 13 insertions, 9 deletions
diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb
index d191a203dd..c95b8221a1 100644
--- a/actionpack/test/abstract_unit.rb
+++ b/actionpack/test/abstract_unit.rb
@@ -175,6 +175,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::DebugExceptions"
middleware.use "ActionDispatch::Callbacks"
middleware.use "ActionDispatch::ParamsParser"
middleware.use "ActionDispatch::Cookies"
@@ -338,16 +339,19 @@ end
module ActionDispatch
class ShowExceptions
private
- remove_method :public_path
- def public_path
- "#{FIXTURE_LOAD_PATH}/public"
- end
+ remove_method :public_path
+ def public_path
+ "#{FIXTURE_LOAD_PATH}/public"
+ end
+ end
- remove_method :stderr_logger
- # Silence logger
- def stderr_logger
- nil
- end
+ class DebugExceptions
+ private
+ remove_method :stderr_logger
+ # Silence logger
+ def stderr_logger
+ nil
+ end
end
end