Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Cherry-picked from master to fix the build #1506

Merged
merged 3 commits into from

2 participants

@arunagw
Collaborator

Cherry-picked from master to fix the build

Don't need to cherry-pick by hand just press the merge button :-)

/cc @josevalim

@josevalim josevalim merged commit e9b025e into from
@jake3030 jake3030 referenced this pull request from a commit in jake3030/rails
@miloops miloops Add missing model files so tests can run isolated [#1506 state:resolved]
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com>
9cf6b1b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
8 railties/test/application/console_test.rb
@@ -4,11 +4,17 @@ 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 load_environment
+ def teardown
+ ENV['RAILS_ENV'] = @prev_rails_env
+ end
+
+ def load_environment(sandbox = false)
require "#{rails_root}/config/environment"
Rails.application.load_console
end
View
6 railties/test/application/initializers/frameworks_test.rb
@@ -5,11 +5,17 @@ class FrameworlsTest < Test::Unit::TestCase
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
View
6 railties/test/application/loading_test.rb
@@ -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
Something went wrong with that request. Please try again.