diff options
author | José Valim <jose.valim@gmail.com> | 2011-06-06 03:52:34 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-06-06 03:52:34 -0700 |
commit | 2d3ba54b86a7307d01fbe364ed831de428cabeba (patch) | |
tree | f53c7a3486fea85f42d60a4ada48c0e3dba3c520 /railties/test/application/console_test.rb | |
parent | 38b97d289c0b6002408246207cf3f5568644bdc5 (diff) | |
parent | 5d78d812228950ad62b4e3895f50a6468a936dc9 (diff) | |
download | rails-2d3ba54b86a7307d01fbe364ed831de428cabeba.tar.gz rails-2d3ba54b86a7307d01fbe364ed831de428cabeba.tar.bz2 rails-2d3ba54b86a7307d01fbe364ed831de428cabeba.zip |
Merge pull request #1504 from arunagw/console_test_for_ci_server
Fix for CI server. Dependent on RAILS_ENV=development
Diffstat (limited to 'railties/test/application/console_test.rb')
-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 |