Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

framework_test.rb also dependent on RAILS_ENV=development #1497

Merged
merged 2 commits into from

2 participants

@arunagw
Collaborator

/cc @jonleighton

I think loading_test.rb is also needed. I can send one more or update this pull request :-)

@josevalim josevalim merged commit 38b97d2 into rails:master
@arunagw
Collaborator

@josevalim Please cherry-pick these into 3-1-stable and 3-0-stable also.

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
6 railties/test/application/initializers/frameworks_test.rb
@@ -5,11 +5,17 @@ class FrameworksTest < 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.