aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/test_unit/railtie.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/test_unit/railtie.rb')
-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 ab1ebe1f8c..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) && Rake.application.top_level_tasks.grep(/^(default$|test(:|$))/).any?
+if defined?(Rake.application) && Rake.application.top_level_tasks.grep(/^(default$|test(:|$))/).any?
ENV['RAILS_ENV'] ||= 'test'
end