tags:

views:

15

answers:

1

Using tspec 2 I want to create a rake task on the fly to be run, we used to do the following in RSpec 1:

Spec::Rake::SpecTask.new(:client) do |t|
  t.spec_files = FileList['spec/units/client/**/*_spec.rb']
  t.spec_opts = spec_opts
end

But now Spec::Rake::SpecTask was substituted, any suggestions?

Regards

A: 

The task name now is Rspec::Core::RakeTask task, as in

Rspec::Core::RakeTask.new(:client) do |t|
  t.pattern = ".spec/units/client/**/*_spec.rb"
  t.spec_opts = spec_opts
end
Lucas