aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/show_exceptions_test.rb
diff options
context:
space:
mode:
authorlest <just.lest@gmail.com>2011-11-24 22:37:48 +0300
committerlest <just.lest@gmail.com>2011-11-25 13:09:46 +0300
commitcd9d28d6fdff6819dac3c6643fe882eb568b5a39 (patch)
tree51f564da303f193576bc022a3fafae093748b445 /actionpack/test/dispatch/show_exceptions_test.rb
parent0cd3bf84068dd2b2d0bbb26062f2cdc7093a1b04 (diff)
downloadrails-cd9d28d6fdff6819dac3c6643fe882eb568b5a39.tar.gz
rails-cd9d28d6fdff6819dac3c6643fe882eb568b5a39.tar.bz2
rails-cd9d28d6fdff6819dac3c6643fe882eb568b5a39.zip
middlewares should use logger from env
Diffstat (limited to 'actionpack/test/dispatch/show_exceptions_test.rb')
-rw-r--r--actionpack/test/dispatch/show_exceptions_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/show_exceptions_test.rb b/actionpack/test/dispatch/show_exceptions_test.rb
index 9f4d6c530f..5875725b5d 100644
--- a/actionpack/test/dispatch/show_exceptions_test.rb
+++ b/actionpack/test/dispatch/show_exceptions_test.rb
@@ -128,4 +128,11 @@ class ShowExceptionsTest < ActionDispatch::IntegrationTest
get "/", {}, {'action_dispatch.show_exceptions' => true}
assert_equal "text/html; charset=utf-8", response.headers["Content-Type"]
end
+
+ test 'uses logger from env' do
+ @app = ProductionApp
+ output = StringIO.new
+ get "/", {}, {'action_dispatch.show_exceptions' => true, 'action_dispatch.logger' => Logger.new(output)}
+ assert_match(/puke/, output.rewind && output.read)
+ end
end