mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Merge pull request #1505 from arunagw/3-1-stable
Cherry-picked from master to fix the build
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -5,11 +5,17 @@ module ApplicationTests
|
||||
include ActiveSupport::Testing::Isolation
|
||||
|
||||
def setup
|
||||
@prev_rails_env = ENV['RAILS_ENV']
|
||||
ENV['RAILS_ENV'] = 'development'
|
||||
build_app
|
||||
boot_rails
|
||||
FileUtils.rm_rf "#{app_path}/config/environments"
|
||||
end
|
||||
|
||||
def teardown
|
||||
ENV['RAILS_ENV'] = @prev_rails_env
|
||||
end
|
||||
|
||||
# AC & AM
|
||||
test "set load paths set only if action controller or action mailer are in use" do
|
||||
assert_nothing_raised NameError do
|
||||
|
||||
@@ -4,10 +4,16 @@ class LoadingTest < 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 app
|
||||
@app ||= Rails.application
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user