diff options
Diffstat (limited to 'railties')
-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 |