From 3b35366d5df8c8d8a7b216c42dd96b0cfa38fee4 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Thu, 18 Dec 2008 12:57:37 -0600 Subject: Use more generic test env flag --- actionpack/lib/action_controller/dispatcher.rb | 2 +- actionpack/lib/action_controller/failsafe.rb | 2 +- actionpack/lib/action_controller/integration.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'actionpack/lib/action_controller') 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| -- cgit v1.2.3