From 5d78d812228950ad62b4e3895f50a6468a936dc9 Mon Sep 17 00:00:00 2001
From: Arun Agrawal <arun@fromjaipur.com>
Date: Mon, 6 Jun 2011 16:13:22 +0530
Subject: Fix for CI server. Dependent on RAILS_ENV=development

---
 railties/test/application/console_test.rb | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'railties/test')

diff --git a/railties/test/application/console_test.rb b/railties/test/application/console_test.rb
index db8f1f2ac6..91e2c2480e 100644
--- a/railties/test/application/console_test.rb
+++ b/railties/test/application/console_test.rb
@@ -4,10 +4,16 @@ class ConsoleTest < Test::Unit::TestCase
   include ActiveSupport::Testing::Isolation  
 
   def setup
+    @prev_rails_env = ENV['RAILS_ENV']
+    ENV['RAILS_ENV'] = 'development'
     build_app
     boot_rails
   end
 
+  def teardown
+    ENV['RAILS_ENV'] = @prev_rails_env
+  end
+
   def load_environment(sandbox = false)
     require "#{rails_root}/config/environment"
     Rails.application.sandbox = sandbox
-- 
cgit v1.2.3