开发者

How to create a RSpec task with Rspec 2?

开发者 https://www.devze.com 2023-01-14 05:50 出处:网络
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:

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
0

精彩评论

暂无评论...
验证码 换一张
取 消