Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

guard against calling prerequisites on nil #378

Closed
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+3 −1
Split
@@ -1,6 +1,8 @@
require 'rspec/core'
require 'rspec/core/rake_task'
-Rake.application.instance_variable_get('@tasks')['default'].prerequisites.delete('test')
+if default = Rake.application.instance_variable_get('@tasks')['default']
+ default.prerequisites.delete('test')
+end
spec_prereq = Rails.configuration.generators.options[:rails][:orm] == :active_record ? "db:test:prepare" : :noop
task :noop do; end