Skip to content

Support Cucumber-Ruby v4 and later#845

Merged
olleolleolle merged 1 commit into
vcr:masterfrom
brasmusson:cucumber-v4-support
Jan 24, 2021
Merged

Support Cucumber-Ruby v4 and later#845
olleolleolle merged 1 commit into
vcr:masterfrom
brasmusson:cucumber-v4-support

Conversation

@brasmusson

Copy link
Copy Markdown
Contributor

In version 4 of Cucumber-Ruby the execution of test cases is based on Pickles. Therefore less data from the feature files are available to the before/after/etc hooks. Also the Gherkin grammar has changed so that (all) Scenarios can have Examples - that is "Scenario Outline" is not just synonym for "Scenario".

Therefore, in case of the "use scenario name" option, use the feature file name instead of feature name, and use the row of the example to create uniqueness for Scenarios with Examples.

Fixes #843.

In version 4 of Cucumber-Ruby the execution of test cases is based on
Pickles. Therefore less data from the feature files are available to
the before/after/etc hooks. Also the Gherkin grammar has changed so
that (all) Scenarios can have Examples - that is "Scenario Outline" is
not just synonym for "Scenario".

Therefore, in case of the "use scenario name" option, use the feature
file name instead of feature name, and use the row of the example to
create uniqueness for Scenarios with Examples.

@olleolleolle olleolleolle left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @brasmusson!

@olleolleolle olleolleolle merged commit bbfd03d into vcr:master Jan 24, 2021
andrehjr added a commit to andrehjr/vcr that referenced this pull request Dec 28, 2021
@andrehjr andrehjr mentioned this pull request Dec 28, 2021
andrehjr added a commit to andrehjr/vcr that referenced this pull request Dec 28, 2021
olleolleolle pushed a commit that referenced this pull request Jan 2, 2022
* upgrade cucumber to 7.0

* Fix specs due to Scenario#cell_values being no longer available

* Update cassette file name to match behavior introduced on #845

* Update Gemfile.cucumber to ~> 4.0

Co-authored-by: Tim Aßmann <tassmann@jovoto.com>
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

Successfully merging this pull request may close these issues.

Cucumber 5.2.0 no longer supports the .feature method to get the name of a test case, used in "use_scenario_name"

2 participants