diff options
author | Arun Agrawal <arun@fromjaipur.com> | 2011-06-06 16:13:22 +0530 |
---|---|---|
committer | Arun Agrawal <arun@fromjaipur.com> | 2011-06-06 16:13:22 +0530 |
commit | 5d78d812228950ad62b4e3895f50a6468a936dc9 (patch) | |
tree | f53c7a3486fea85f42d60a4ada48c0e3dba3c520 /railties/test | |
parent | 38b97d289c0b6002408246207cf3f5568644bdc5 (diff) | |
download | rails-5d78d812228950ad62b4e3895f50a6468a936dc9.tar.gz rails-5d78d812228950ad62b4e3895f50a6468a936dc9.tar.bz2 rails-5d78d812228950ad62b4e3895f50a6468a936dc9.zip |
Fix for CI server. Dependent on RAILS_ENV=development
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/console_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
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 |