aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/test_unit
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/test_unit')
-rw-r--r--railties/lib/rails/test_unit/railtie.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/test_unit/railtie.rb b/railties/lib/rails/test_unit/railtie.rb
index 75180ff978..878b9b7930 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(/^(default$|test(:|$))/).any?
+if defined?(Rake.application) && Rake.application.top_level_tasks.grep(/^test(?::|$)/).any?
ENV['RAILS_ENV'] ||= 'test'
end