Made by Nathan

programming and projects

RSpec Tasks on Rails 3

| Comments

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