- #317: Fix an error for
Minitest/MultipleAssertions
when using for-style loops. (@earlopain) - #314: Fix an error for
Minitest/SkipEnsure
when onlyensure
has a body. (@earlopain)
- #314: (Breaking) Raise a useful error when using a Cop in
AssertOffense
if the Cop's class is not defined. (@brandoncc)
- #301: Add new Minitest/Focus cop. (@jaredmoody)
- #300: Fix an error for
Minitest/AssertEmptyLiteral
when only passing an empty literal. (@earlopain)
- #303: Require RuboCop 1.61 to use
AutoCorrect: Contextual
. (@koic) - #304: Require RuboCop AST >= 1.31.1 to support Prism as a Ruby Parser. (@koic)
- #299: Fix an error for
Style/UselessAssertion
when passing a single argument to methods to accept two arguments. (@earlopain)
- #298: Extend
Minitest/AssertKindOf
to also correctassert(object.is_a?(Class))
. (@amomchilov)
- #287: Don't error on empty blocks when linting
assert_raises
. (@G-Rath) - #289: Don't count assertions twice when their return value is being assigned. (@G-Rath)
- #283: Fix an error for
Minitest/MultipleAssertions
when using||
assigning a value to a variable. (@koic)
- #272: Add new
Minitest/RedundantMessageArgument
cop. (@koic) - #279: Add new
Minitest/NonExecutableTestMethod
cop. (@koic)
- #275: Make
Minitest/AssertMatch
aware ofassert_operator
when running with Ruby 2.7. (@koic) - #271: Fix a false positive for
Minitest/EmptyLineBeforeAssertionMethods
andassert_raises
. (@fatkodima)
- #270: Ignore offenses inside redundant parentheses. (@sambostock)
- #274: Require RuboCop AST 1.30.0+. (@koic)
- #276: Enhance
AssertSame
/RefuteSame
to check forobject_id
comparison. (@fatkodima)
- #266: Make
Minitest/AssertEqual
aware ofassert_operator
. (@koic) - #268: Make
Minitest/AssertMatch
aware ofassert_operator
. (@koic) - #267: Make
Minitest/RefuteEqual
aware ofassert_operator
andrefute_operator
. (@koic) - #269: Make
Minitest/RefuteMatch
aware ofrefute_operator
andassert_operator
. (@koic)
- #263: Fix an error for
Minitest/AssertOperator
andMinitest/RefuteOperator
when using unary operation argument. (@koic)
- #264: Make
Minitest/AssertOperator
andMinitest/RefuteOperator
allow index access with[]
. (@flavorjones)
- #261: Fix an error for
Minitest/AssertOperator
andMinitest/RefuteOperator
when using variable argument. (@koic)
- #259: Fix autocorrection for
Minitest/LiteralAsActualArgument
,Minitest/AssertPathExists
, andMinitest/RefutePathExists
cops to preserve the presence or absence of argument parentheses. (@koic)
- #236: Add new
Minitest/ReturnInTestMethod
cop. (@fatkodima)
- #250: (Breaking) Drop Ruby 2.6 support. (@koic)
- #249: Handle assertions in conditionals branches in
Minitest/MultipleAssertions
cop. (@fatkodima)
- #248: Make
Minitest/AssertInstanceOf
andMinitest/RefuteInstanceOf
aware ofassert_equal(Class, object.class)
andrefute_equal(Class, object.class)
. (@koic) - #244: Make
Minitest/GlobalExpectations
aware ofmust_pattern_match
andwont_pattern_match
matchers. (@koic) - #216: Add new
Minitest/NoTestCases
cop. (@tejasbubane)
- #238: Support
it
/test
testing blocks as test cases. (@fatkodima)
- #214: Add new
Minitest/LifecycleHooksOrder
cop. (@fatkodima)
- #239: Enhance
AssertMatch
/RefuteMatch
to checkmatch?
and=~
methods. (@fatkodima)
- #220: Add new
Minitest/NonPublicTestMethod
cop. (@fatkodima)
- #237: Fix a false positive for
Minitest/UselessAssertion
when using command execution. (@fatkodima)
- #234: Mark
Minitest/AssertTruthy
as unsafe. (@koic) - #233: Mark
Minitest/RefuteFalse
as unsafe. (@koic) - #231: Change what is considered a test case by
rubocop-minitest
(public
method without arguments withtest_
name prefix). (@fatkodima)
- #225: Fix an error for
Minitest/TestFileName
when using empty file. (@koic) - #223: Fix a false positive for
Minitest/MultipleAssertions
when using assertion method with block. (@fatkodima)
- #215: Add new
Minitest/AssertSame
andMinitest/RefuteSame
cops. (@tejasbubane) - #213: Add new
Minitest/TestFileName
cop. (@tejasbubane) - #205: Add new
Minitest/UselessAssertion
cop. (@fatkodima)
- #210: Fix a false positive for
Minitest/EmptyLineBeforeAssertionMethodsTest
when using assertion method with block arg before other assertion method. (@koic)
- #209: Mark
Minitest/AssertTruthy
as unsafe autocorrection. (@koic) - #204: Raise severity of
Minitest/AssertRaisesWithRegexpArgument
,Minitest/AssertWithExpectedArgument
,Minitest/GlobalExpectations
,Minitest/SkipEnsure
, andMinitest/UnreachableAssertion
cops to warning. (@koic)
- #198: Add new
Minitest/SkipWithoutReason
cop. (@fatkodima)
- #189: Fix a false positive for
Minitest/EmptyLineBeforeAssertionMethods
when using an assertion method as the first line within a test block. (@ryanquanz)
- #189: Fix a false positive for
Minitest/EmptyLineBeforeAssertionMethods
when usingrescue
before assertion method. (@koic) - #187: Fix an error for
Minitest/EmptyLineBeforeAssertionMethods
when using method call with block. (@koic) - #190: Fix an incorrect autocorrect for
Minitest/EmptyLineBeforeAssertionMethods
when using method call with source code comment before assertion method. (@koic) - #189: Fix a false negative for
Minitest/EmptyLineBeforeAssertionMethods
when using non assertion method statement before assertion method used in a block. (@koic) - #189: Fix a false negative for
Minitest/EmptyLineBeforeAssertionMethods
when using assertion method used in block before assertion method. (@koic)
- #185: Fix an incorrect autocorrect for
Minitest/RefuteMatch
whenrefute
withmatch
and RHS is a regexp literal. (@koic)
- #179: New
Minitest/AssertRaisesWithRegexpArgument
cop checks for regular expression literals passed toassert_raises
. (@rwstauner)
- #181: Fix an incorrect autocorrect for
Minitest/AssertMatch
whenassert
withmatch
and RHS is a regexp literal. (@koic)
- #109: Add new
Minitest/AssertRaisesCompoundBody
cop. (@fatkodima)
- #172: Fix a false positive for
Minitest/AssertPredicate
andMinitest/RefutePredicate
when using numbered parameters. (@koic)
- #167: Fix potential for valid Ruby code to be unparsable in
Minitest/DuplicateTestRun
cop. (@gjtorikian)
- #164: Add new
Minitest/DuplicateTestRun
cop. (@ignacio-chiazzo)
- #162: Make
Minitest/AssertNil
(Minitest/RefuteNil
) aware ofassert_predicate(obj, :nil?)
(refute_predicate(obj, :nil?)
). (@koic)
- #159: Fix a false positive for
Minitest/UnreachableAssertion
when using only one assertion method inassert_raises
block. (@koic)
- #155: Provide
assert_offense
,assert_correction
, andassert_no_offenses
testing APIs for custom Minitest cop development. (@koic)
- #142: Fix
Minitest/GlobalExpectations
autocorrect when receiver is lambda. (@gi) - #150: Fix a false positive for
Minitest/AssertEmpty
andRefuteEmpty
cops when usingempty
method with any arguments. (@koic)
- #143: Fix an error for
Minitest/LiteralAsActualArgumentTest
when expected and actual arguments are literals. (@koic)
- #140: Make
Minitest/AssertNil
andMinitest/RefuteNil
aware ofassert(obj.nil?)
andrefute(obj.nil?)
. (@koic)
- #136: Support Active Support's
test
method forMinitest/MultipleAssertions
andMinitest/NoAssertions
cops. (@koic)
- #131: Fix an error for
Minitest/MultipleAssertions
and fixes a false positive fortest
block. (@koic)
- #124: Add new
Minitest/NoAssertions
cop. (@ghiculescu)
- #117: Add new cop
Minitest/AssertWithExpectedArgument
to check for unintended usages ofassert
instead ofassert_equal
. (@cstyles)
- #122: Fix
Minitest/TestMethodName
for tests with multiple assertions. (@ghiculescu)
- #118: (BREAKING) Fix
Minitest/AssertEmptyLiteral
by making it check forassert_equal([], array)
instead ofassert([], array)
. (@cstyles) - #125: Require RuboCop 0.90 or higher. (@koic)
- #115: Fix a false positive for
Minitest/TestMethodName
for when defining test method has an argument, and test method without assertion methods. (@koic)
- #113: Fix an error for
Minitest/AssertEqual
and some cops when usingassert
with block argument. (@koic)
- #92: Add new
Minitest/LiteralAsActualArgument
cop. (@fatkodima, @tsmmark) - #95: Add new
Minitest/AssertionInLifecycleHook
cop. (@fatkodima) - #91: Add new
Minitest/AssertInDelta
andMinitest/RefuteInDelta
cops. (@fatkodima) - #89: Add new
Minitest/TestMethodName
cop. (@fatkodima) - #83: New cops
AssertPathExists
andRefutePathExists
check for use ofassert_path_exists
/refute_path_exists
instead ofassert(File.exist?(path))
/refute(File.exist?(path))
. (@fatkodima) - #88: Add new
Minitest/MultipleAssertions
cop. (@fatkodima) - #87: Add new
Minitest/AssertSilent
cop. (@fatkodima) - #96: Add new
Minitest/UnspecifiedException
cop. (@fatkodima) - #98: Add new
Minitest/AssertOutput
cop. (@fatkodima) - #84: New cops
AssertKindOf
andRefuteKindOf
check for use ofassert_kind_of
/refute_kind_of
instead ofassert(foo.kind_of?(Class))
/refute(foo.kind_of?(Class))
. (@fatkodima) - #85: Add autocorrect to
Rails/AssertEmptyLiteral
cop. (@fatkodima)
- #75: Fix a false negative for
Minitest/GlobalExpectations
when using global expectation methods with no arguments. (@koic)
- #73: The Minitest department works on file names end with
_test.rb
by default. (@koic) - #77: (Compatibility) Drop support for Ruby 2.3. (@koic)
- #72: Fix some false negatives for
Minitest/GlobalExpectations
. (@andrykonchin)
- #66: Support all expectations of
Minitest::Expectations
forMinitest/GlobalExpectations
cop. (@koic)
- #60: Fix
Minitest/GlobalExpectations
autocorrection for chained methods. (@tejasbubane) - #69: Fix a false negative for
Minitest/GlobalExpectations
cop when using a variable or a hash index for receiver. (@koic) - #71: Fix a false negative for
Minitest/AssertEqual
when an argument is enclosed in redundant parentheses. (@koic)
- #60: Add new cop
Minitest/GlobalExpectations
to check for deprecated global expectations. (@tejasbubane)
- #58: Fix a false negative for
Minitest/AssertMatch
andMinitest/RefuteMatch
when an argument is enclosed in redundant parentheses. (@koic) - #59: Fix a false negative for
Minitest/AssertRespondTo
andMinitest/RefuteRespondTo
when an argument is enclosed in redundant parentheses. (@koic) - #61: Fix a false negative for
Minitest/AssertInstanceOf
andMinitest/RefuteInstanceOf
when an argument is enclosed in redundant parentheses. (@koic) - #62: Fix a false negative for
Minitest/AssertEmpty
andMinitest/RefuteEmpty
when an argument is enclosed in redundant parentheses. (@koic)
- #52: Make
Minitest/RefuteFalse
cop aware ofassert(!test)
. (@koic) - #52: Fix a false negative for
Minitest/AssertIncludes
andMinitest/RefuteIncludes
when an argument is enclosed in redundant parentheses. (@koic)
- #49: New cops
AssertMatch
andRefuteMatch
check for use ofassert_match
/refute_match
instead ofassert(foo.match(bar))
/refute(foo.match(bar))
. (@fsateler)
- #42: Fix an incorrect autocorrect for some cops of
Minitest
department when using heredoc message. (@koic)
- #32: Add new
Minitest/AssertEmptyLiteral
cop. (@tejasbubane)
- #39: Fix an incorrect autocorrect for
Minitest/AssertRespondTo
andMinitest/RefuteRespondTo
when using assertion method callingrespond_to
with receiver omitted. (@koic)
- #29: Add new
Minitest/RefuteRespondTo
cop. (@herwinw) - #31: Add new
Minitest/AssertEqual
cop. (@herwinw) - #34: Add new
Minitest/AssertInstanceOf
cop. (@abhaynikam) - #35: Add new
Minitest/RefuteInstanceOf
cop. (@abhaynikam)
- #25: Add
Enabled: true
toMinitest
department config to suppressWarning: Minitest does not support Enabled parameter
. (@koic)
- #15: Add new
Minitest/RefuteIncludes
cop. (@abhaynikam) - #18: Add new
Minitest/RefuteFalse
cop. (@duduribeiro) - #20: Add new
Minitest/RefuteEmpty
cop. (@abhaynikam) - #21: Add new
Minitest/RefuteEqual
cop. (@duduribeiro) - #27: Add new
Minitest/AssertRespondTo
cop. (@duduribeiro)
- #19: Fix a false negative for
Minitest/AssertIncludes
when usinginclude
method in arguments ofassert
method. (@abhaynikam)
- #11: Add new
Minitest/RefuteNil
cop. (@tejasbubane) - #8: Add new
Minitest/AssertTruthy
cop. (@abhaynikam) - #9: Add new
Minitest/AssertIncludes
cop. (@abhaynikam) - #10: Add new
Minitest/AssertEmpty
cop. (@abhaynikam)
- Create RuboCop Minitest gem. (@koic)
- #6: Add new
Minitest/AssertNil
cop. (@duduribeiro)