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:
parent
2e22c7fda0
commit
3b35366d5d
3 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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|
|
||||
|
|
Loading…
Reference in a new issue