aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-05-28 12:11:29 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-05-28 12:11:29 -0300
commit643e0b23d6483dfe8e7b10f690a940c4c490df4e (patch)
tree22af17e9dc1e76ad3ea2ffd925e033c8258991ff /railties/lib/rails
parente10262962b0be6525f93824a2dcb51f1f88d2c05 (diff)
parentbdc2aa54caf2ac7a11e42b4a3a25a6fdb892d86d (diff)
downloadrails-643e0b23d6483dfe8e7b10f690a940c4c490df4e.tar.gz
rails-643e0b23d6483dfe8e7b10f690a940c4c490df4e.tar.bz2
rails-643e0b23d6483dfe8e7b10f690a940c4c490df4e.zip
Merge pull request #10629 from stmpjmpr/bug_10628
Fixes bug 10628.
Diffstat (limited to 'railties/lib/rails')
-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..598140284a 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) && defined?(Rake.application) && Rake.application.top_level_tasks.grep(/^(default$|test(:|$))/).any?
ENV['RAILS_ENV'] ||= 'test'
end