How to create a RSpec task with Rspec 2?
Using tspec 2 I want t开发者_C百科o 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
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
精彩评论