aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2016-10-29 01:14:32 -0200
committerGitHub <noreply@github.com>2016-10-29 01:14:32 -0200
commitf81a5ffbdec6c1d748aaef02ba10a6e0d86cbf3f (patch)
tree1fcad3574d79c217a95782255c7c000089840191 /actionpack/test
parenta8b996a0eee9aae455c5f82fac0baf24edb3a9c1 (diff)
parentf99c37583dab9e1a6d8a67a407def0b2408df706 (diff)
downloadrails-f81a5ffbdec6c1d748aaef02ba10a6e0d86cbf3f.tar.gz
rails-f81a5ffbdec6c1d748aaef02ba10a6e0d86cbf3f.tar.bz2
rails-f81a5ffbdec6c1d748aaef02ba10a6e0d86cbf3f.zip
Merge pull request #26926 from gsamokovarov/debug-exceptions-plain-loggers
Support plain loggers in DebugExceptions
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/dispatch/debug_exceptions_test.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/debug_exceptions_test.rb b/actionpack/test/dispatch/debug_exceptions_test.rb
index 2c5e09e283..bff52f2a2b 100644
--- a/actionpack/test/dispatch/debug_exceptions_test.rb
+++ b/actionpack/test/dispatch/debug_exceptions_test.rb
@@ -384,6 +384,23 @@ class DebugExceptionsTest < ActionDispatch::IntegrationTest
end
end
+ test "logs with non active support loggers" do
+ @app = DevelopmentApp
+ io = StringIO.new
+ logger = Logger.new(io)
+
+ _old, ActionView::Base.logger = ActionView::Base.logger, logger
+ begin
+ assert_nothing_raised do
+ get "/", headers: { "action_dispatch.show_exceptions" => true, "action_dispatch.logger" => logger }
+ end
+ ensure
+ ActionView::Base.logger = _old
+ end
+
+ assert_match(/puke/, io.rewind && io.read)
+ end
+
test "uses backtrace cleaner from env" do
@app = DevelopmentApp
backtrace_cleaner = ActiveSupport::BacktraceCleaner.new