1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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|