-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Added duplicated tests run hint. #46
Conversation
README.adoc
Outdated
|
||
[source,ruby] | ||
---- | ||
# example |
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.
Can you update it?
# example | |
# bad |
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.
Maybe
# bad (unless multiple runs are the intended behavior)
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.
(I find the good
/bad
terminology that the guides use to be not ideal, since they don't really account for nuance or context).
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.
(approved pending @koic's suggestion)
c0542fe
to
b40401e
Compare
Thanks. Can you squash your commits into one? |
Minitest uses Ruby classes, if a Minitest class inherits from another class, it will also inherit its methods causing Minitest to run the parent's tests twice. In some cases, we want them to run them twice, but most of the time, we don't. This commit contains an informative example This blog post contains more info: https://ignaciochiazzo.medium.com/dont-run-your-ruby-minitest-classes-twice-988645662cdb.
b40401e
to
df12a46
Compare
👍 |
Minitest uses Ruby classes, if a Minitest class inherits from another class, it will also inherit its methods causing Minitest to run the parent's tests twice. In some cases, we want them to run them twice, but most of the time, we don't.
This warning is based on a Rubocop rule for duplicated tests. This blog post and this library contain more information.
Fixes #45