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

[gem] Update cucumber to 7.0.0 #2579

Merged
merged 5 commits into from
Sep 7, 2021
Merged

[gem] Update cucumber to 7.0.0 #2579

merged 5 commits into from
Sep 7, 2021

Conversation

hallelujah
Copy link
Contributor

@hallelujah hallelujah commented Aug 30, 2021

We will skip many versions from start.
It does not look like there are special needs to do for the upgrade in our case

A bit of investigation lead to this commit cucumber/cucumber-ruby@2327369

Fixes env.rb and support files load order
According to The Cucumber Book on pp. 129-130:

> Just like `features/step_definitions`, Cucumber will load all Ruby
> files it finds in `features/support`. This is convenient, because it
> means you don't need to pepper `require` statements everywhere, but it
> does mean that the precise order in which files are loaded is hard to
> control. In practice, this means you can't have dependencies between
> files in the `support` directory, because you can't expect that
> another file will have already been loaded. There is one exception to
> that, a special file called `env.rb`.
>
> The file `features/support/env.rb` is always the very first file to be
> loaded when Cucumber starts a test run.

This is also extened such that any `env.rb` file located in descendant
`support` folders are _also_ loaded before other `*.rb` files in
`support` folders.

However, when attempting to create a better port of Cucumber in the
Pester PowerShell testing framework, I found this load ordering to not
be correct.

This commit fixes the order in which files in `support` folders are
loaded so that:

1. the `features/support/env.rb` file is always loaded first, if found
2. other `env.rb` files located in descendent `support` folders under
`features` are loaded second
3. all other `*.rb` files in descendant `support` folders are loaded

Going to update to 5.3.0, make it green, then upgrade to 6.x make it green then finally to 7.x

@hallelujah hallelujah self-assigned this Aug 30, 2021
We will skip many versions from start.
It does not look like there are special needs to do for the upgrade in our case
@hallelujah hallelujah force-pushed the upgrade-cucumber branch 2 times, most recently from 570db5d to 1358116 Compare September 6, 2021 15:30
All regexp catch should be parameterized
Scenario: Switch postpaid/prepaid mode Around hook Message:
The test case has no steps (Cucumber::Core::Test::Result::Undefined) features/old/finance/settings/provider.feature:19:in `Switch postpaid/prepaid mode'
@hallelujah hallelujah marked this pull request as ready for review September 7, 2021 12:35
@hallelujah hallelujah merged commit 91c0c1b into master Sep 7, 2021
@hallelujah hallelujah deleted the upgrade-cucumber branch September 7, 2021 12:46
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.

1 participant