Skip to content

Prepare for RSpec 4#1838

Open
mvz wants to merge 4 commits intomainfrom
prepare-for-rspec-4
Open

Prepare for RSpec 4#1838
mvz wants to merge 4 commits intomainfrom
prepare-for-rspec-4

Conversation

@mvz
Copy link
Copy Markdown
Contributor

@mvz mvz commented Mar 27, 2026

Description

This updates the spec suite to work with RSpec 4's default settings, meaning:

  • No global RSpec DSL. This is in fact not just a setting: There is no way in RSpec 4 to turn the global DSL back on.
  • Verification of partial doubles. The default value for this setting will be changed from false to true. While this setting could be changed with RSpec 4 so partial doubles are not verified, verifying is generally a good thing so it's better to swith to true now.

All this is in preparation for testing Cucumber with RSpec 4.0.0.beta1 in combination with diff-lcs 2.0. See #1814.

Type of change

  • Refactoring (improvements to code design or tooling that don't change behaviour)

Checklist:

Your PR is ready for review once the following checklist is
complete. You can also add some checks if you want to.

  • Tests have been added for any changes to behaviour of the code
  • New and existing tests are passing locally and on CI
  • bundle exec rubocop reports no offenses
  • RDoc comments have been updated
  • CHANGELOG.md has been updated

Copy link
Copy Markdown
Contributor

@luke-hill luke-hill left a comment

Choose a reason for hiding this comment

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

Reviewed the simple stuff 61/64 are good. I'll review the other items soon.

Copy link
Copy Markdown
Contributor

@luke-hill luke-hill left a comment

Choose a reason for hiding this comment

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

Reviewed all files. Couple of questions but by and large no issues

c.before { Cucumber::Term::ANSIColor.coloring = true }
RSpec.configure do |config|
config.expose_dsl_globally = false
config.mock_with :rspec do |mocks|
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there a ref to what this does?

end

context 'when mapping to world methods' do
let(:target) { double('target') }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Given this just seems to be abstracting out a variable. I'm not sure why we need the three lines below? Are they needed?

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.

2 participants