Permalink
Browse files

Merge pull request #1497 from arunagw/framework_test

framework_test.rb also dependent on RAILS_ENV=development
  • Loading branch information...
2 parents f9b4123 + 8e51383 commit 38b97d289c0b6002408246207cf3f5568644bdc5 @josevalim josevalim committed Jun 6, 2011
@@ -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
@@ -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

0 comments on commit 38b97d2

Please sign in to comment.