aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application
diff options
context:
space:
mode:
authorPrem Sichanugrist <s@sikachu.com>2011-02-23 02:25:38 +0700
committerAaron Patterson <aaron.patterson@gmail.com>2011-02-25 10:03:40 -0800
commit439a74520daa6ff255c83000cf6b0f3407805acf (patch)
treed37f7406facbff75d064a459ba3d2b00344bcf3b /railties/test/application
parent13547c16d97b5f52db11d9f48704bbea20b54a4c (diff)
downloadrails-439a74520daa6ff255c83000cf6b0f3407805acf.tar.gz
rails-439a74520daa6ff255c83000cf6b0f3407805acf.tar.bz2
rails-439a74520daa6ff255c83000cf6b0f3407805acf.zip
Make sure that we set `env["action_dispatch.show_exceptions"]`
This has been used by `show_exception` middleware even the setting wasn't get passed to `env` hash.
Diffstat (limited to 'railties/test/application')
-rw-r--r--railties/test/application/configuration_test.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb
index 4f4b7beec4..044fd2a278 100644
--- a/railties/test/application/configuration_test.rb
+++ b/railties/test/application/configuration_test.rb
@@ -318,5 +318,20 @@ module ApplicationTests
assert ActionView::Resolver.caching?
end
+
+ test "config.action_dispatch.show_exceptions is sent in env" do
+ make_basic_app do |app|
+ app.config.action_dispatch.show_exceptions = true
+ end
+
+ class ::OmgController < ActionController::Base
+ def index
+ render :text => env["action_dispatch.show_exceptions"]
+ end
+ end
+
+ get "/"
+ assert_equal 'true', last_response.body
+ end
end
end