rubocop-minitest icon indicating copy to clipboard operation
rubocop-minitest copied to clipboard

Code style checking for Minitest files.

Results 17 rubocop-minitest issues
Sort by recently updated
recently updated
newest added

Add a few things I learned from #179 to `CONTRIBUTING.md` ----------------- Before submitting the PR make sure the following are checked: * [x] The PR relates to *only* one subject...

Fixes #157. This PR adds new `Minitest/EmptyLinesBeforeAssertionMethods` cop. This cop enforces empty line before assertion method. ```ruby # bad do_something assert_equal(expected, actual) # good do_something assert_equal(expected, actual) ``` ----------------- Before...

Closes #152 ----------------- Before submitting the PR make sure the following are checked: * [x] Wrote [good commit messages][1]. * [x] Commit message starts with `[Fix #issue-number]` (if the related...

So there's already a `assert_includes` and `refute_includes` which each respectively verify that you use `assert_includes` over `assert(collection.includes?(object))`, but there's another method we can check for here, which I think should...

When testing for generic errors (like `ArgumentError`, `RuntimeError`, `KeyError`, `IndexError` etc) we need to check for the error message to not get false positives. ```ruby def foo(a, b, c) raise...

feature request

## Is your feature request related to a problem? Please describe. `ActiveSuppport::TestCase` inherits from `Minitest::Test` but isn't recognized by the `test_class?` method since it doesn't end in `Test`: https://github.com/rubocop/rubocop-minitest/blob/50ce80a009fbf8bb1c627176b19c0100b865d2fa/lib/rubocop/cop/mixin/minitest_exploration_helpers.rb#L24-L26 ##...

In our tests we try to keep all assertions at the last line(s), and always a newline in-between. Don't know if this is something others prefer, but thought I'd add...

## Is your feature request related to a problem? Please describe. In one of my projects, there are other matcher methods that are not a part of the core Minitest...

From the minitest README: > If you want to extend your test using setup/teardown via a module, just make sure you ALWAYS call super. I'd love to have a cop...

feature request

I've been writing custom cops for various jobs for a while now, but I've never had a consistent way to write tests for products that use minitest as the test...