Skip to content
Browse files

guard against calling prerequisites on nil

- Closes #377.
- Closes #378.
  • Loading branch information...
1 parent 8b5260b commit 8bc247d92ae30d53264cb2b5bfd9221dde3c25a4 @jackdempsey jackdempsey committed with dchelimsky
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/rspec/rails/tasks/rspec.rake
View
4 lib/rspec/rails/tasks/rspec.rake
@@ -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

0 comments on commit 8bc247d

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