diff options
author | José Valim <jose.valim@gmail.com> | 2011-06-06 02:43:32 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-06-06 02:43:32 -0700 |
commit | 38b97d289c0b6002408246207cf3f5568644bdc5 (patch) | |
tree | 8e79fbf29c12d659cdc6765acb85a5f1c2049c63 /railties/test | |
parent | f9b41237c88346c83b1d6c1a231657905636e096 (diff) | |
parent | 8e51383a6b65c5e20bbee83a3023b81ab6791c45 (diff) | |
download | rails-38b97d289c0b6002408246207cf3f5568644bdc5.tar.gz rails-38b97d289c0b6002408246207cf3f5568644bdc5.tar.bz2 rails-38b97d289c0b6002408246207cf3f5568644bdc5.zip |
Merge pull request #1497 from arunagw/framework_test
framework_test.rb also dependent on RAILS_ENV=development
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/initializers/frameworks_test.rb | 6 | ||||
-rw-r--r-- | railties/test/application/loading_test.rb | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/railties/test/application/initializers/frameworks_test.rb b/railties/test/application/initializers/frameworks_test.rb index 196d121c14..9068bf4b1e 100644 --- a/railties/test/application/initializers/frameworks_test.rb +++ b/railties/test/application/initializers/frameworks_test.rb @@ -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 diff --git a/railties/test/application/loading_test.rb b/railties/test/application/loading_test.rb index c340465e87..5e7e16733e 100644 --- a/railties/test/application/loading_test.rb +++ b/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 |