Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guard::Cucumber::NotificationFormatter fails on Cucumber 4.0.0 #41

Open
todd-a-jacobs opened this issue Jun 8, 2020 · 2 comments
Open

Comments

@todd-a-jacobs
Copy link

Several tests related to the NotificationFormatter fail with Cucumber 4.0.0. It appears that Cucumber 4.x removed classes and methods that were relied on by guard-cucumber:

  1. Cucumber::Core::Ast
  2. Cucumber::Runtime#steps

The spec errors are reproduced below.

$ bundle exec rspec
Run options: include {:focus=>true}

All examples were filtered out; ignoring {:focus=>true}

Randomized with seed 58616
.............................................FFF..............

Failures:

  1) Guard::Cucumber::NotificationFormatter#step_name when failure is in a background step notifies with a valid feature name
     Failure/Error: instance_double(Cucumber::Core::Ast::Feature, name: "feature1")
     
     NameError:
       uninitialized constant Cucumber::Core::Ast
     # ./spec/guard/cucumber/notification_formatter_spec.rb:30:in `block (3 levels) in <top (required)>'
     # ./spec/guard/cucumber/notification_formatter_spec.rb:34:in `block (3 levels) in <top (required)>'

  2) Guard::Cucumber::NotificationFormatter#step_name with a buggy Background implementation correctly gets the feature name
     Failure/Error: instance_double(Cucumber::Core::Ast::Feature, name: "feature1")
     
     NameError:
       uninitialized constant Cucumber::Core::Ast
     # ./spec/guard/cucumber/notification_formatter_spec.rb:30:in `block (3 levels) in <top (required)>'
     # ./spec/guard/cucumber/notification_formatter_spec.rb:34:in `block (3 levels) in <top (required)>'

  3) Guard::Cucumber::NotificationFormatter after all features formats the notification
     Failure/Error: allow(mother).to receive(:steps).with(:passed).and_return([step])
       the Cucumber::Runtime class does not implement the instance method: steps
     # ./spec/guard/cucumber/notification_formatter_spec.rb:11:in `block (3 levels) in <top (required)>'

Finished in 0.09354 seconds (files took 2.13 seconds to load)
62 examples, 3 failures

Failed examples:

rspec ./spec/guard/cucumber/notification_formatter_spec.rb:47 # Guard::Cucumber::NotificationFormatter#step_name when failure is in a background step notifies with a valid feature name
rspec ./spec/guard/cucumber/notification_formatter_spec.rb:62 # Guard::Cucumber::NotificationFormatter#step_name with a buggy Background implementation correctly gets the feature name
rspec ./spec/guard/cucumber/notification_formatter_spec.rb:18 # Guard::Cucumber::NotificationFormatter after all features formats the notification

Randomized with seed 58616
@ozzyaaron
Copy link

Just in case this has prevented people attempting a Cucumber upgrade, it appears that you can just disable this notifier by adding notification: false in the guard cucumber setup: https://github.com/guard/guard-cucumber#list-of-available-options

That's letting me upgrade to Cucumber 5.x and still use guard.

@cbroult
Copy link

cbroult commented Jun 25, 2022

Just in case this has prevented people attempting a Cucumber upgrade, it appears that you can just disable this notifier by adding notification: false in the guard cucumber setup: https://github.com/guard/guard-cucumber#list-of-available-options

That's letting me upgrade to Cucumber 5.x and still use guard.

Same here w/ Cucumber 8.x.

cbroult added a commit to cbroult/erb-processor that referenced this issue Jun 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants