config/default.yml in rubocop-minitest-0.25.1 vs config/default.yml in rubocop-minitest-0.26.0
- old
+ new
@@ -83,35 +83,47 @@
VersionAdded: '0.21'
Minitest/AssertRaisesWithRegexpArgument:
Description: 'This cop enforces checks for regular expression literals passed to `assert_raises`.'
Enabled: pending
+ Severity: warning
VersionAdded: '0.22'
+ VersionChanged: '0.26'
Minitest/AssertRespondTo:
Description: 'This cop enforces the test to use `assert_respond_to(object, :do_something)` over `assert(object.respond_to?(:do_something))`.'
StyleGuide: 'https://minitest.rubystyle.guide#assert-responds-to-method'
Enabled: true
VersionAdded: '0.3'
+Minitest/AssertSame:
+ Description: 'Enforces the use of `assert_same(expected, actual)` over `assert(expected.equal?(actual))`.'
+ StyleGuide: 'https://minitest.rubystyle.guide#assert-same'
+ Enabled: pending
+ VersionAdded: '0.26'
+
Minitest/AssertSilent:
Description: "This cop enforces the test to use `assert_silent { ... }` instead of using `assert_output('', '') { ... }`."
StyleGuide: 'https://github.com/rubocop/minitest-style-guide#assert-silent'
Enabled: 'pending'
VersionAdded: '0.10'
Minitest/AssertTruthy:
Description: 'This cop enforces the test to use `assert(actual)` instead of using `assert_equal(true, actual)`.'
StyleGuide: 'https://minitest.rubystyle.guide#assert-truthy'
Enabled: true
+ SafeAutoCorrect: false
VersionAdded: '0.2'
+ VersionChanged: '0.26'
Minitest/AssertWithExpectedArgument:
Description: 'This cop tries to detect when a user accidentally used `assert` when they meant to use `assert_equal`.'
Enabled: pending
+ Severity: warning
Safe: false
VersionAdded: '0.11'
+ VersionChanged: '0.26'
Minitest/AssertionInLifecycleHook:
Description: 'This cop checks for usage of assertions in lifecycle hooks.'
Enabled: 'pending'
VersionAdded: '0.10'
@@ -129,10 +141,11 @@
Minitest/GlobalExpectations:
Description: 'This cop checks for deprecated global expectations.'
StyleGuide: 'https://minitest.rubystyle.guide#global-expectations'
Enabled: true
+ Severity: warning
EnforcedStyle: any
Include:
- '**/test/**/*'
- '**/*_test.rb'
- '**/spec/**/*'
@@ -141,11 +154,11 @@
- _
- any
- expect
- value
VersionAdded: '0.7'
- VersionChanged: '0.16'
+ VersionChanged: '0.26'
Minitest/LiteralAsActualArgument:
Description: 'This cop enforces correct order of `expected` and `actual` arguments for `assert_equal`.'
StyleGuide: 'https://minitest.rubystyle.guide/#assert-equal-arguments-order'
Enabled: 'pending'
@@ -232,30 +245,51 @@
Description: 'This cop enforces the test to use `refute_respond_to(object, :do_something)` over `refute(object.respond_to?(:do_something))`.'
StyleGuide: 'https://minitest.rubystyle.guide#refute-respond-to'
Enabled: true
VersionAdded: '0.4'
+Minitest/RefuteSame:
+ Description: 'Enforces the use of `refute_same(expected, actual)` over `refute(expected.equal?(actual))`.'
+ StyleGuide: 'https://minitest.rubystyle.guide#refute-same'
+ Enabled: pending
+ VersionAdded: '0.26'
+
Minitest/SkipEnsure:
Description: 'Checks that `ensure` call even if `skip`.'
Enabled: pending
+ Severity: warning
VersionAdded: '0.20'
+ VersionChanged: '0.26'
Minitest/SkipWithoutReason:
Description: 'Checks for skipped tests missing the skipping reason.'
Enabled: pending
VersionAdded: '0.24'
+Minitest/TestFileName:
+ Description: 'Checks if test file names start with `test_` or end with `_test.rb`.'
+ StyleGuide: 'https://minitest.rubystyle.guide/#file-naming'
+ Enabled: pending
+ VersionAdded: '0.26'
+
Minitest/TestMethodName:
Description: 'This cop enforces that test method names start with `test_` prefix.'
Enabled: 'pending'
VersionAdded: '0.10'
Minitest/UnreachableAssertion:
Description: 'This cop checks for an `assert_raises` block containing any unreachable assertions.'
Enabled: pending
+ Severity: warning
VersionAdded: '0.14'
+ VersionChanged: '0.26'
Minitest/UnspecifiedException:
Description: 'This cop checks for a specified error in `assert_raises`.'
StyleGuide: 'https://minitest.rubystyle.guide#unspecified-exception'
Enabled: 'pending'
VersionAdded: '0.10'
+
+Minitest/UselessAssertion:
+ Description: 'Detects useless assertions (assertions that either always pass or always fail).'
+ Enabled: pending
+ VersionAdded: '0.26'