aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorJosh Kalderimis <josh.kalderimis@gmail.com>2011-03-24 23:24:47 +0100
committerSantiago Pastorino <santiago@wyeworks.com>2011-03-24 19:43:48 -0300
commit5170d210e84ab38fa93a1346ebe32b12e75d72bc (patch)
tree4195f706789899ae6e4cd0372ad4487d934fb80f /actionpack/test
parent5214e73850916de3c9127d35a4ecee0424d364a3 (diff)
downloadrails-5170d210e84ab38fa93a1346ebe32b12e75d72bc.tar.gz
rails-5170d210e84ab38fa93a1346ebe32b12e75d72bc.tar.bz2
rails-5170d210e84ab38fa93a1346ebe32b12e75d72bc.zip
correction to the outputted controller name in the diagnostics error template, test included
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'actionpack/test')
-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