Cucumber v4 causes issues
colinbruce opened this issue · 4 comments
On 24 Jun 2020 dependabot updated cucumber-rails to 2.1.0
This introduced support for cucumber v4
Because our Gemfile did specify a specific version of Cucumber it updated to 4 and this caused every test to fail
I locked cucumber to v3 to allow the tests to run
The failures mainly seemed to fall into two sections
undefined method `feature'
and
private method `puts'
This will probably require some investigation of the changelogs of cucumber/cucumber-ruby where the breaking changes were introduced
Told @dependabot to ignore future v4 updates here #1547
Having followed the chanelog history of cucumber-rails -> cucumber-ruby and around the hills, I found a reference to cucumber 4 changing the load methods.
Adding Cucumber.use_legacy_autoloader
to features/support/env.rb
makes more tests run but there are still issues with Around
blocks e.g. undefined method `feature' for #<Cucumber::RunningTestCase::TestCase:0x00007fdc08742ca0> (NoMethodError) ./features/support/env.rb:114:in `block in <top (required)>'
points to the block call in the Warden around call
Around do |_scenario, block|
Warden.test_mode!
block.call # <<< line 114
Warden.test_reset!
end
Hmm, now cucumber is up to 5, still broken. ignoring this too :/ Have added a ticket to investigate and, hopefully, remove the blocker
Resolved by #1861