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

Add tests for expect_no_corrections and expect_correction loop behaviour #12776

Merged
merged 1 commit into from
Mar 16, 2024

Conversation

Earlopain
Copy link
Contributor

This relates to #12763 and #12774, where behaviour for these two methods was changed. Undoing changes from these PRs will make these new tests fail.

I thought it would be nice to explicitly test against since there shouldn't ever be code here where this behaviour is actually triggered. I haven't found a place where the expectations were already tested so I made a new file for that.


Before submitting the PR make sure the following are checked:

  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
  • Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.

@bbatsov bbatsov requested a review from koic March 11, 2024 11:41
@bbatsov
Copy link
Collaborator

bbatsov commented Mar 15, 2024

I'm OK with the proposed changes. @koic are you okay with the suggested location for the tests?

@koic
Copy link
Member

koic commented Mar 15, 2024

Considering spec/rubocop/rspec_expect_offense_spec.rb, it seems better to place it as spec/rubocop/rspec/expect_offense_spec.rb to form the testing pair with lib/rubocop/rspec/expect_offense.rb.

@koic koic merged commit e682185 into rubocop:master Mar 16, 2024
33 checks passed
@Earlopain Earlopain deleted the testing-tests branch March 16, 2024 17:30
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.

None yet

3 participants