You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While adding a new test case to a large codebase (rails/rails as an example) with its test files sometimes having thousands of lines of code and not following TDD (as I believe most of people do, mine included, except for bugfixes), it is very easy to add a test case to the private class section. The test case won't be run and the developer will think that tests are passing.
I agree that this is probably out of the xUnit execution pattern. However, I'm not sure if that was intentional or a mistake by user. First of all, it may be better to specify it in Minitest Style Guide as it will become a stronger basis as a rule: https://github.com/rubocop/minitest-style-guide
Okay, It doesn't have to be checked inside the method. Note, protected should also be treated the same as private. So, the cop name can be adjusted if we get good inspiration.
While adding a new test case to a large codebase (
rails/rails
as an example) with its test files sometimes having thousands of lines of code and not following TDD (as I believe most of people do, mine included, except for bugfixes), it is very easy to add a test case to theprivate
class section. The test case won't be run and the developer will think that tests are passing.The text was updated successfully, but these errors were encountered: