1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix for CI server. Dependent on RAILS_ENV=development

This commit is contained in:
Arun Agrawal 2011-06-06 16:13:22 +05:30
parent 38b97d289c
commit 5d78d81222

View file

@ -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