From 62570e8626c67f9d38b28246304b938aab9d9fbe Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Mon, 6 Jun 2011 13:54:05 +0100 Subject: Solve the RAILS_ENV problem in the railties tests in a more generic way --- railties/test/application/rake_test.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'railties/test/application/rake_test.rb') diff --git a/railties/test/application/rake_test.rb b/railties/test/application/rake_test.rb index ab36ace5e5..44ac6615de 100644 --- a/railties/test/application/rake_test.rb +++ b/railties/test/application/rake_test.rb @@ -10,6 +10,10 @@ module ApplicationTests FileUtils.rm_rf("#{app_path}/config/environments") end + def teardown + teardown_app + end + def test_gems_tasks_are_loaded_first_than_application_ones app_file "lib/tasks/app.rake", <<-RUBY $task_loaded = Rake::Task.task_defined?("db:create:all") @@ -113,7 +117,7 @@ module ApplicationTests end require "#{rails_root}/config/environment" - + # loading a specific fixture errormsg = Dir.chdir(app_path) { `rake db:fixtures:load FIXTURES=products` } assert $?.success?, errormsg -- cgit v1.2.3