I’m updating Erector to RSpec 2 and came across two problems for which solutions were surprisingly difficult to Google. Here are my (finally successful) results.
no such file to load -- spec/rake/spectask
require "spec/rake/spectask" # RSpec 1.3
require "rspec/core/rake_task" # RSpec 2.0
undefined method `spec_files=' for #<RSpec::Core::RakeTask:0x00000101550aa8>
# RSpec 1.3 Spec::Rake::SpecTask.new(:core) do |spec| spec.spec_files = FileList['spec/erector/*_spec.rb'] spec.spec_opts = ['--backtrace'] end
# RSpec 2.0 RSpec::Core::RakeTask.new(:core) do |spec| spec.pattern = 'spec/erector/*_spec.rb' spec.rspec_opts = ['--backtrace'] end
See also http://github.com/rspec/rspec-core/blob/master/Upgrade.markdown (curiously cloaked from Google searches for the above problem strings).