diff options
author | Joshua Peek <josh@joshpeek.com> | 2008-12-18 12:57:37 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-12-18 12:57:37 -0600 |
commit | 3b35366d5df8c8d8a7b216c42dd96b0cfa38fee4 (patch) | |
tree | 0632280c179df20797a3e59ec7e4df7e315aff06 /actionpack/lib/action_controller | |
parent | 2e22c7fda00f78db79cb2dcc79495c085035240d (diff) | |
download | rails-3b35366d5df8c8d8a7b216c42dd96b0cfa38fee4.tar.gz rails-3b35366d5df8c8d8a7b216c42dd96b0cfa38fee4.tar.bz2 rails-3b35366d5df8c8d8a7b216c42dd96b0cfa38fee4.zip |
Use more generic test env flag
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/dispatcher.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/failsafe.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/integration.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/dispatcher.rb b/actionpack/lib/action_controller/dispatcher.rb index f0897d98b2..5a185eb59c 100644 --- a/actionpack/lib/action_controller/dispatcher.rb +++ b/actionpack/lib/action_controller/dispatcher.rb @@ -120,7 +120,7 @@ module ActionController def checkin_connections # Don't return connection (and peform implicit rollback) if this request is a part of integration test # TODO: This callback should have direct access to env - return if @request.key?("action_controller.test") + return if @request.key?("rack.test") ActiveRecord::Base.clear_active_connections! end diff --git a/actionpack/lib/action_controller/failsafe.rb b/actionpack/lib/action_controller/failsafe.rb index b1e9957b49..567581142c 100644 --- a/actionpack/lib/action_controller/failsafe.rb +++ b/actionpack/lib/action_controller/failsafe.rb @@ -11,7 +11,7 @@ module ActionController @app.call(env) rescue Exception => exception # Reraise exception in test environment - if env["action_controller.test"] + if env["rack.test"] raise exception else failsafe_response(exception) diff --git a/actionpack/lib/action_controller/integration.rb b/actionpack/lib/action_controller/integration.rb index 277cede1cf..7590d5d710 100644 --- a/actionpack/lib/action_controller/integration.rb +++ b/actionpack/lib/action_controller/integration.rb @@ -291,7 +291,7 @@ module ActionController "rack.multiprocess" => true, "rack.run_once" => false, - "action_controller.test" => true + "rack.test" => true ) (headers || {}).each do |key, value| |