2

我正在尝试正确设置我的保护文件,以便通常只运行正在进行的黄瓜功能。然后,一旦它们完成,我想(手动)运行我的所有功能。我已经修改了我的保护文件来拥有它,但是 run_all 不起作用。它只是运行@wip 功能。

guard 'cucumber', :cli => "--no-profile --tags @wip --format 'pretty'", :run_all => { :cli => "--no-profile --color --format 'progress' --strict" } do
  watch(%r{^features/.+\.feature$})
  watch(%r{^features/support/.+$})          { 'features' }
  watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' }
end

:run_all 方法是如何工作的?

4

2 回答 2

1

最终不得不为每个定义格式。

guard 'cucumber', :cli => "--no-profile --tags @wip --format 'pretty'", :run_all => { :cli => "--no-profile -f Cucumber::Formatter::Fuubar features" } do
  watch(%r{^features/.+\.feature$})
  watch(%r{^features/support/.+$})          { 'features' }
  watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' }
end
于 2011-10-06T20:54:04.970 回答
0

如果您尝试运行除 @wip 之外的所有内容,则需要添加 ~@wip

于 2011-08-31T05:43:40.870 回答