Skip to content

Commit

Permalink
Fixed broken Guard Cucumber execution
Browse files Browse the repository at this point in the history
Disabled notification as suggested by
guard/guard-cucumber#41 (comment)
  • Loading branch information
cbroult committed Jun 25, 2022
1 parent 67277fd commit a0e41df
Showing 1 changed file with 14 additions and 34 deletions.
48 changes: 14 additions & 34 deletions Guardfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,40 +29,6 @@ guard :bundler do
files.each { |file| watch(helper.real_path(file)) }
end

cucumber_options = {
# Below are examples overriding defaults

# cmd: 'bin/cucumber',
# cmd_additional_args: '--profile guard',

# all_after_pass: false,
# all_on_start: false,
# keep_failed: false,
# feature_sets: ['features/frontend', 'features/experimental'],

# run_all: { cmd_additional_args: '--profile guard_all' },
# focus_on: { 'wip' }, # @wip
notification: true
}

guard "cucumber", cucumber_options do
watch(%r{^features/.+\.feature$})
watch(%r{^features/support/.+$}) { "features" }

watch(%r{^features/step_definitions/(.+)_steps\.rb$}) do |m|
Dir[File.join("**/#{m[1]}.feature")][0] || "features"
end
end

# NOTE: The cmd option is now required due to the increasing number of ways
# rspec may be run, below are examples of the most common uses.
# * bundler: 'bundle exec rspec'
# * bundler binstubs: 'bin/rspec'
# * spring: 'bin/rspec' (This will use spring if running and you have
# installed the spring binstubs per the docs)
# * zeus: 'zeus rspec' (requires the server to be started separately)
# * 'just' rspec: 'rspec'

group :red_green_refactor, halt_on_fail: true do
guard :rspec, cmd: "bundle exec rspec" do
require "guard/rspec/dsl"
Expand All @@ -85,6 +51,20 @@ group :red_green_refactor, halt_on_fail: true do
watch(/.+\.rb$/)
watch(%r{(?:.+/)?\.rubocop(?:_todo)?\.yml$}) { |m| File.dirname(m[0]) }
end

cucumber_options = {
cmd_additional_args: "--no-profile", # --format progress --color",
notification: false
}

guard "cucumber", cucumber_options do
watch(%r{^features/.+\.feature$})
watch(%r{^features/support/.+$}) { "features" }

watch(%r{^features/step_definitions/(.+)_steps\.rb$}) do |m|
Dir[File.join("**/#{m[1]}.feature")][0] || "features"
end
end
end

guard "yard" do
Expand Down

0 comments on commit a0e41df

Please sign in to comment.