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/CHANGELOG.md | 4 ---- railties/lib/rails/test_unit/railtie.rb | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) (limited to 'railties') diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index 1343f0a628..8a41f160fa 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -26,10 +26,6 @@ *Matthew Draper* -* Do not set the Rails environment to test by default when using test_unit Railtie. - - *Konstantin Shabanov* - * Remove sqlite3 lines from `.gitignore` if the application is not using sqlite3. *Dmitrii Golub* 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