aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch
diff options
context:
space:
mode:
authorSergey Nartimov <just.lest@gmail.com>2011-12-13 22:32:39 +0300
committerSergey Nartimov <just.lest@gmail.com>2011-12-13 22:32:39 +0300
commit081431fdf180ec7395c769793b2270d244566ca2 (patch)
treea54c772f61d119477185206ed8b3c97eef858168 /actionpack/test/dispatch
parent0f4da5b39394fe1096e93a7f2600f4d90330d1c0 (diff)
downloadrails-081431fdf180ec7395c769793b2270d244566ca2.tar.gz
rails-081431fdf180ec7395c769793b2270d244566ca2.tar.bz2
rails-081431fdf180ec7395c769793b2270d244566ca2.zip
log exception backtrace when all backtrace lines silenced
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r--actionpack/test/dispatch/debug_exceptions_test.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/debug_exceptions_test.rb b/actionpack/test/dispatch/debug_exceptions_test.rb
index f7411c7729..6133bfe338 100644
--- a/actionpack/test/dispatch/debug_exceptions_test.rb
+++ b/actionpack/test/dispatch/debug_exceptions_test.rb
@@ -122,4 +122,17 @@ class DebugExceptionsTest < ActionDispatch::IntegrationTest
get "/", {}, {'action_dispatch.show_exceptions' => true, 'action_dispatch.backtrace_cleaner' => cleaner}
assert_match(/passed backtrace cleaner/, body)
end
+
+ test 'logs exception backtrace when all lines silenced' do
+ output = StringIO.new
+ backtrace_cleaner = ActiveSupport::BacktraceCleaner.new
+ backtrace_cleaner.add_silencer { true }
+
+ env = {'action_dispatch.show_exceptions' => true,
+ 'action_dispatch.logger' => Logger.new(output),
+ 'action_dispatch.backtrace_cleaner' => backtrace_cleaner}
+
+ get "/", {}, env
+ assert_operator (output.rewind && output.read).lines.count, :>, 10
+ end
end