From 99873ca1ea98d73c73f8be60dfce0a54224f4ea8 Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Wed, 28 May 2014 16:31:04 +0200 Subject: Revert "Merge pull request #12778 from etehtsea/rake-default-fix" This reverts commit ec0a2b57f67c9153cb5f7bbe2a3f66d13fe64bdd, reversing changes made to a8bd7b16260c217290ef8fe3a166fcceac442c62. This reverts commit 555ec36522011862c03b483c53be32410594a51e This reverts commit 555ec36522011862c03b483c53be32410594a51e By default, Rails uses the `default` Rake task to run all tests. This commit changed the environment of the default task to `development`. This clears the development database and has other negative consequences. --- railties/lib/rails/test_unit/railtie.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/lib/rails/test_unit') diff --git a/railties/lib/rails/test_unit/railtie.rb b/railties/lib/rails/test_unit/railtie.rb index 878b9b7930..75180ff978 100644 --- a/railties/lib/rails/test_unit/railtie.rb +++ b/railties/lib/rails/test_unit/railtie.rb @@ -1,4 +1,4 @@ -if defined?(Rake.application) && Rake.application.top_level_tasks.grep(/^test(?::|$)/).any? +if defined?(Rake.application) && Rake.application.top_level_tasks.grep(/^(default$|test(:|$))/).any? ENV['RAILS_ENV'] ||= 'test' end -- cgit v1.2.3