![](/img/trans.png)
[英]Ruby on Rails: How do I write a rake file to run individual cucumber commands
[英]Ruby on Rails: How do I run a Cucumber task inside a rake file?
目前,我有这个
Rake :: Task ['FEATURE = features / Authentication.feature黄瓜']。调用
但身份证不起作用..说
Don't know how to build task 'FEATURE=features/Authentication.feature cucumber'
但是当我这样做
rake FEATURE=features/Authentication.feature cucumber
有效... = \\
在新的rake文件中(lib / tasks):
require 'rubygems'
require 'cucumber'
require 'cucumber/rake/task'
namespace :cucumber do
Cucumber::Rake::Task.new(:authentication2) do |t|
t.cucumber_opts = "features/Authentication.feature"
end
Cucumber::Rake::Task.new(:preview_all) do |t|
t.cucumber_opts = "features/Preview.feature features/PreviewButton.feature"
end
end
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.