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

Refactor RSpec/Focus, increase branch coverage #2033

Merged
merged 1 commit into from
Feb 10, 2025
Merged

Conversation

bquorning
Copy link
Collaborator

@bquorning bquorning commented Feb 9, 2025

The corrector logic for pair_type/str_type/sym_type seems like a "generic" implementation, so I move things around to let that be a "default" case in the if/else block.

To avoid conflicts with other PRs improving code coverage, the .simplecov file is not updated here.


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).

@bquorning bquorning requested a review from a team as a code owner February 9, 2025 12:56
@bquorning
Copy link
Collaborator Author

cc @corsonknowles

@bquorning bquorning added this to the Code coverage milestone Feb 9, 2025
@corsonknowles
Copy link
Contributor

Astute! And I imagine probably a sliver more performant.

@bquorning bquorning requested a review from pirj February 9, 2025 21:18
The corrector logic for pair_type/str_type/sym_type seems like a
"generic" implementation, so I move things around to let that be a
"default" case in the if/else block.

Also, inlining `#focus_metadata` into `#on_send` means we don't even
need to check the type.

Co-authored-by: Phil Pirozhkov <[email protected]>
@bquorning bquorning changed the title Increase branch coverage of RSpec/Focus Refactor RSpec/Focus, increase branch coverage Feb 10, 2025
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.

Just perfect! Thank you 🙌

@bquorning bquorning merged commit 2e3cca0 into master Feb 10, 2025
27 checks passed
@bquorning bquorning deleted the focus-cop-coverage branch February 10, 2025 11:25
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.

3 participants