Fixes bug 10628.

This commit is contained in:
Scott Hill 2013-05-15 00:20:59 -07:00
parent e2f3e50229
commit bdc2aa54ca
2 changed files with 3 additions and 1 deletions

@ -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