aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2014-05-28 16:31:04 +0200
committerYves Senn <yves.senn@gmail.com>2014-05-28 17:43:45 +0200
commit99873ca1ea98d73c73f8be60dfce0a54224f4ea8 (patch)
tree1261d565c41a4bca7200fe2ca650b7f1480f3999 /railties
parentabd6461e2881a09cb7b719ffb016c0c85d89ffe0 (diff)
downloadrails-99873ca1ea98d73c73f8be60dfce0a54224f4ea8.tar.gz
rails-99873ca1ea98d73c73f8be60dfce0a54224f4ea8.tar.bz2
rails-99873ca1ea98d73c73f8be60dfce0a54224f4ea8.zip
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.
Diffstat (limited to 'railties')
-rw-r--r--railties/CHANGELOG.md4
-rw-r--r--railties/lib/rails/test_unit/railtie.rb2
2 files changed, 1 insertions, 5 deletions
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