Use more generic test env flag

This commit is contained in:
Joshua Peek
2008-12-18 12:57:37 -06:00
parent 2e22c7fda0
commit 3b35366d5d
3 changed files with 3 additions and 3 deletions

View File

@@ -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

View File

@@ -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)

View File

@@ -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|