RyanJM
RyanJM

Reputation: 7068

Guard + cucumber => custom guard file

I'm trying to correctly setup my guard file in order to normally only run cucumber features that are in progress. Then, once they have completed, I want to run all of my features (manually). I have modified my guard file to have this, but the run_all isn't working. It just runs the @wip features.

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

How does the :run_all method work?

Upvotes: 2

Views: 997

Answers (2)

RyanJM
RyanJM

Reputation: 7068

Ended up having to define the format for each.

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

Upvotes: 1

oreoshake
oreoshake

Reputation: 4928

If you are trying to run everything BUT @wip, you need to add ~@wip

Upvotes: 0

Related Questions