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 an error for Ambiguous cop name RSpec/Rails/HttpStatus #25

Merged
merged 1 commit into from Apr 11, 2024

Conversation

ydah
Copy link
Member

@ydah ydah commented Apr 11, 2024

Fix: #18
This PR fixes an error for Ambiguous cop name RSpec/Rails/HttpStatus in the rubocop-rspec_rails gem.


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

@ydah ydah changed the title WIP Fix an error for Ambiguous cop name RSpec/Rails/HttpStatus Apr 11, 2024
@ydah ydah changed the title Fix an error for Ambiguous cop name RSpec/Rails/HttpStatus Fix an error for Ambiguous cop name RSpec/Rails/HttpStatus Apr 11, 2024
Fix: #18
This PR fixes an error for Ambiguous cop name `RSpec/Rails/HttpStatus` in the `rubocop-rspec_rails` gem.
@ydah ydah marked this pull request as ready for review April 11, 2024 07:18
@ydah ydah requested a review from a team as a code owner April 11, 2024 07:18
@@ -21,7 +21,7 @@
# https://github.com/rubocop/rubocop-rspec_rails/issues/8
module RuboCop
module Cop
class AmbiguousCopName # rubocop:disable Style/Documentation
class Registry # rubocop:disable Style/Documentation
Copy link
Member Author

@ydah ydah Apr 11, 2024

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

🙈 I reviewed that code.

Copy link
Contributor

Choose a reason for hiding this comment

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

By the way, it’s not necessary to reopen the class to prepend a module. E.g. RuboCop::Cop::Registry.prepend(Module.new… would work fine.

@ydah
Copy link
Member Author

ydah commented Apr 11, 2024

@mjankowski @pirj This should fix it.

@@ -21,7 +21,7 @@
# https://github.com/rubocop/rubocop-rspec_rails/issues/8
module RuboCop
module Cop
class AmbiguousCopName # rubocop:disable Style/Documentation
class Registry # rubocop:disable Style/Documentation
Copy link
Contributor

Choose a reason for hiding this comment

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

By the way, it’s not necessary to reopen the class to prepend a module. E.g. RuboCop::Cop::Registry.prepend(Module.new… would work fine.

@ydah ydah merged commit d3e5455 into master Apr 11, 2024
27 checks passed
@ydah ydah deleted the fix-ambisious branch April 11, 2024 07:56
@pirj
Copy link
Member

pirj commented Apr 11, 2024

Nice! Thank you 😊

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.

Error "Ambiguous cop name RSpec/Rails/HttpStatus" with latest rubocop-rspec and rubocop-rspec_rails
3 participants