Permalink
Browse files

Fixes bug 10628.

  • Loading branch information...
1 parent e2f3e50 commit bdc2aa54caf2ac7a11e42b4a3a25a6fdb892d86d @stmpjmpr stmpjmpr committed May 15, 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
@@ -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.
@@ -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 bdc2aa5

Please sign in to comment.