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

Fix a bug in RSpec/PredicateMatcher #2036

Merged
merged 1 commit into from
Feb 9, 2025
Merged

Fix a bug in RSpec/PredicateMatcher #2036

merged 1 commit into from
Feb 9, 2025

Conversation

bquorning
Copy link
Collaborator

Don't let RSpec/PredicateMatcher replace respond_to? with two arguments with the RSpec respond_to matcher, since the 2nd argument has a different meaning in the two methods.

Fixes #2010


Before submitting the PR make sure the following are checked:

  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Updated documentation.
  • Added an entry to the CHANGELOG.md if the new code introduces user-observable changes.
  • The build (bundle exec rake) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).

Don't let `RSpec/PredicateMatcher` replace `respond_to?` with two
arguments with the RSpec `respond_to` matcher, since the 2nd argument
has a different meaning in the two methods.

Fixes #2010
@bquorning bquorning requested a review from a team as a code owner February 9, 2025 21:04
Copy link
Member

@pirj pirj left a comment

Choose a reason for hiding this comment

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

Thanks!

@bquorning bquorning merged commit 27e37d5 into master Feb 9, 2025
27 checks passed
@bquorning bquorning deleted the fix-2010 branch February 9, 2025 21:16
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.

False positive for RSpec/RedundantPredicateMatcher at be_respond_to(:method, true)
2 participants