aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/show_exceptions_test.rb
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2011-03-30 21:04:33 -0500
committerJoshua Peek <josh@joshpeek.com>2011-03-30 21:04:33 -0500
commit56a5da89dbcdd6d73f26f5c1be6221b684574b2b (patch)
tree577fbc16d37ed54bbda1a2a7477894caa6a7bfff /actionpack/test/dispatch/show_exceptions_test.rb
parent5df076ad0965dc684afff8a019fd9f92a53ada76 (diff)
parent58c3ec1b7b7ee073edf9c245de5d06426be60a25 (diff)
downloadrails-56a5da89dbcdd6d73f26f5c1be6221b684574b2b.tar.gz
rails-56a5da89dbcdd6d73f26f5c1be6221b684574b2b.tar.bz2
rails-56a5da89dbcdd6d73f26f5c1be6221b684574b2b.zip
Merge branch 'master' into sprockets
Conflicts: railties/lib/rails/application/configuration.rb
Diffstat (limited to 'actionpack/test/dispatch/show_exceptions_test.rb')
-rw-r--r--actionpack/test/dispatch/show_exceptions_test.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/show_exceptions_test.rb b/actionpack/test/dispatch/show_exceptions_test.rb
index 2a478c214f..e453dd11ce 100644
--- a/actionpack/test/dispatch/show_exceptions_test.rb
+++ b/actionpack/test/dispatch/show_exceptions_test.rb
@@ -7,6 +7,8 @@ class ShowExceptionsTest < ActionDispatch::IntegrationTest
case req.path
when "/not_found"
raise ActionController::UnknownAction
+ when "/runtime_error"
+ raise RuntimeError
when "/method_not_allowed"
raise ActionController::MethodNotAllowed
when "/not_implemented"
@@ -121,4 +123,18 @@ class ShowExceptionsTest < ActionDispatch::IntegrationTest
assert_response 404
assert_match(/AbstractController::ActionNotFound/, body)
end
+
+ test "show the controller name in the diagnostics template when controller name is present" do
+ @app = ProductionApp
+ get("/runtime_error", {}, {
+ 'action_dispatch.show_exceptions' => true,
+ 'action_dispatch.request.parameters' => {
+ 'action' => 'show',
+ 'id' => 'unknown',
+ 'controller' => 'featured_tiles'
+ }
+ })
+ assert_response 500
+ assert_match(/RuntimeError\n in FeaturedTilesController/, body)
+ end
end