mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #1504 from arunagw/console_test_for_ci_server
Fix for CI server. Dependent on RAILS_ENV=development
This commit is contained in:
commit
2d3ba54b86
1 changed files with 6 additions and 0 deletions
|
@ -4,10 +4,16 @@ class ConsoleTest < Test::Unit::TestCase
|
||||||
include ActiveSupport::Testing::Isolation
|
include ActiveSupport::Testing::Isolation
|
||||||
|
|
||||||
def setup
|
def setup
|
||||||
|
@prev_rails_env = ENV['RAILS_ENV']
|
||||||
|
ENV['RAILS_ENV'] = 'development'
|
||||||
build_app
|
build_app
|
||||||
boot_rails
|
boot_rails
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def teardown
|
||||||
|
ENV['RAILS_ENV'] = @prev_rails_env
|
||||||
|
end
|
||||||
|
|
||||||
def load_environment(sandbox = false)
|
def load_environment(sandbox = false)
|
||||||
require "#{rails_root}/config/environment"
|
require "#{rails_root}/config/environment"
|
||||||
Rails.application.sandbox = sandbox
|
Rails.application.sandbox = sandbox
|
||||||
|
|
Loading…
Reference in a new issue