aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-12-15 19:43:49 +0100
committerJosé Valim <jose.valim@gmail.com>2011-12-15 19:43:49 +0100
commit26e7400cc5415dbce5e2c5d13da96ad8c25749e2 (patch)
tree956eceae5adddf3a1e7f1c5146d2cccf1aed27fa /actionpack/test/controller
parent283a08763495a6b3ce0b196259ee1666f2b08cf1 (diff)
downloadrails-26e7400cc5415dbce5e2c5d13da96ad8c25749e2.tar.gz
rails-26e7400cc5415dbce5e2c5d13da96ad8c25749e2.tar.bz2
rails-26e7400cc5415dbce5e2c5d13da96ad8c25749e2.zip
Fix diagnostics page for routing errors.
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/show_exceptions_test.rb13
1 files changed, 10 insertions, 3 deletions
diff --git a/actionpack/test/controller/show_exceptions_test.rb b/actionpack/test/controller/show_exceptions_test.rb
index 5eff1eb09d..2f5c268330 100644
--- a/actionpack/test/controller/show_exceptions_test.rb
+++ b/actionpack/test/controller/show_exceptions_test.rb
@@ -5,9 +5,17 @@ module ShowExceptions
use ActionDispatch::ShowExceptions
use ActionDispatch::DebugExceptions
+ before_filter :only => :another_boom do
+ request.env["action_dispatch.show_detailed_exceptions"] = true
+ end
+
def boom
raise 'boom!'
end
+
+ def another_boom
+ raise 'boom!'
+ end
end
class ShowExceptionsTest < ActionDispatch::IntegrationTest
@@ -27,9 +35,8 @@ module ShowExceptions
end
end
- test 'show diagnostics from a remote ip when consider_all_requests_local is true' do
- ShowExceptionsController.any_instance.stubs(:consider_all_requests_local).returns(true)
- @app = ShowExceptionsController.action(:boom)
+ test 'show diagnostics from a remote ip when env is already set' do
+ @app = ShowExceptionsController.action(:another_boom)
self.remote_addr = '208.77.188.166'
get '/'
assert_match(/boom/, body)