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

Include all test paths in RSpec cops #16642

Merged
merged 3 commits into from Feb 12, 2024

Conversation

dduugg
Copy link
Sponsor Member

@dduugg dduugg commented Feb 11, 2024

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

Per docs:

By default, rubocop-rspec only inspects code within paths ending in _spec.rb or including spec/.

(Possibly, we want to follow convention and rename the test dir to spec, but we'd still have to apply the fixes here)

Comment on lines 298 to 301
let(:path_with_tilde) { Pathname.new("#{dir}/path_with_tilde") }
let(:glob_path1) { Pathname.new("#{dir}/glob_path1") }
let(:glob_path2) { Pathname.new("#{dir}/glob_path2") }
let(:paths) { [absolute_path, path_with_tilde, glob_path1, glob_path2] }
let(:glob_path) { Pathname.new("#{dir}/glob_path") }
let(:glob_path_) { Pathname.new("#{dir}/glob_path_") }
let(:paths) { [absolute_path, path_with_tilde, glob_path, glob_path_] }
Copy link
Contributor

Choose a reason for hiding this comment

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

This one doesn't make that much sense to me.

Copy link
Sponsor Member Author

Choose a reason for hiding this comment

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

Open to alternatives, just trying to obey the letter and not the spirit of the cop. 😈

Copy link
Sponsor Member Author

Choose a reason for hiding this comment

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

glob_path_alt ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Open to alternatives, just trying to obey the letter and not the spirit of the cop. 😈

🤣

glob_path_alt ?

That's a bit better. I'm fine with that.

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Good catch, thanks again @dduugg!

@MikeMcQuaid
Copy link
Member

(Possibly, we want to follow convention and rename the test dir to spec, but we'd still have to apply the fixes here)

I think that'd be nice!

@MikeMcQuaid MikeMcQuaid merged commit 599db8c into Homebrew:master Feb 12, 2024
24 checks passed
@dduugg dduugg deleted the rubocop-rspec-paths branch February 12, 2024 18:19
@github-actions github-actions bot added the outdated PR was locked due to age label Mar 14, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants