-
-
Notifications
You must be signed in to change notification settings - Fork 44
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 new cop Minitest/TestFileName
#217
Conversation
9da21c3
to
33ec01f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A small suggestion, in comment. Overall, lgtm 💪 Thank you!
Why did you decided to move from |
@fatkodima Because if a test file has multiple classes, |
Minitest/FileName
Minitest/TestFileName
527be8f
to
21cf39b
Compare
Can't we call |
I guess we could, but the cop will be invoked on every class definition which is not needed. |
This shouldn't be a large problem, but yeah, makes sense. Lgtm then 👍 |
@tejasbubane ping. |
Thanks! |
Follow up rubocop/rubocop-minitest#217 (comment). This PR adds new `InternalAffairs/ProcessedSourceBufferName` cop. It enforces the use of `processed_source.file_path` instead of `processed_source.buffer.name`. ```ruby # bad processed_source.buffer.name # good processed_source.file_path ```
Follow up rubocop/rubocop-minitest#217 (comment). This PR adds new `InternalAffairs/ProcessedSourceBufferName` cop. It enforces the use of `processed_source.file_path` instead of `processed_source.buffer.name`. ```ruby # bad processed_source.buffer.name # good processed_source.file_path ```
Closes #213
Before submitting the PR make sure the following are checked:
[Fix #issue-number]
(if the related issue exists).master
(if not - rebase it).bundle exec rake default
. It executes all tests and runs RuboCop on its own code.{change_type}_{change_description}.md
if the new code introduces user-observable changes. See changelog entry format for details.