rubocop / rubocop-minitest

Code style checking for Minitest files.
https://docs.rubocop.org/rubocop-minitest
MIT License
144 stars 44 forks source link

New cop suggestion: detect focussed tests #301

Closed gravitystorm closed 9 months ago

gravitystorm commented 10 months ago

Is your feature request related to a problem? Please describe.

minitest-focus is a great utility to focus in on one test at a time. But the risk is that someone accidentally leaves a test focussed while committing, and nobody notices the test suite is now only one test long.

Describe the solution you'd like

I'd like to see a test that catches this, and fails if any focussed tests are found.

Additional context

rubocop-rspec has the equivalent cop to this - see https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecfocus