RSpec tasks on Rails 3

Problem: uninitialized constant RSpec::Rake

Solution:

You are using rails 3 (and rspec 2), and trying to define a custom rake task with Spec::Rake::SpecTask.new

Instead, do:

RSpec::Core::RakeTask.new(:spec) do |t|
...

and make sure to change:

t.spec_files = FileList['spec/**/*_spec.rb']

to

t.pattern = 'spec/\*_/_\_spec.rb'

comments powered by Disqus