Skip to content
Browse files

Merge pull request #10629 from stmpjmpr/bug_10628

Fixes bug 10628.
  • Loading branch information...
2 parents e102629 + bdc2aa5 commit 643e0b23d6483dfe8e7b10f690a940c4c490df4e @rafaelfranca rafaelfranca committed May 28, 2013
Showing with 3 additions and 1 deletion.
  1. +2 −0 railties/CHANGELOG.md
  2. +1 −1 railties/lib/rails/test_unit/railtie.rb
View
2 railties/CHANGELOG.md
@@ -1,3 +1,5 @@
+* Fixes bug with testing nil Rake::Application (bug #10628).
+
* Fixes bug with scaffold generator with `--assets=false --resource-route=false`.
Fixes #9525.
View
2 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

0 comments on commit 643e0b2

Please sign in to comment.
Something went wrong with that request. Please try again.