From 3cb97aeea8837b9d2b7ed3f9806f5727ceef0e3d Mon Sep 17 00:00:00 2001 From: "Hongli Lai (Phusion)" Date: Sun, 26 Apr 2009 11:23:10 -0500 Subject: [PATCH] Fix environment variable testing code in failsafe.rb. Signed-off-by: Joshua Peek --- actionpack/lib/action_dispatch/middleware/failsafe.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actionpack/lib/action_dispatch/middleware/failsafe.rb b/actionpack/lib/action_dispatch/middleware/failsafe.rb index b5a3abcc92..5e0c479fdd 100644 --- a/actionpack/lib/action_dispatch/middleware/failsafe.rb +++ b/actionpack/lib/action_dispatch/middleware/failsafe.rb @@ -11,7 +11,7 @@ module ActionDispatch @app.call(env) rescue Exception => exception # Reraise exception in test environment - if defined?(Rails) && Rails.test? + if defined?(Rails) && Rails.env.test? raise exception else failsafe_response(exception)