Is your feature request related to a problem? Please describe.
Yes. I commonly need to assert a test result is true, rather than a truthy value. The way to do this in Minitest is assert_equal true, foo.
Describe the solution you'd like
I disable this cop in every project and would simply like it disabled by default. Those that like it can enable it.
Describe alternatives you've considered
I guess I could ask @zenspider to add an assert_true and assert_false to Minitest..
Additional context
Minitest does not have an assert_true assertion, assert always passes on any truthy value. Therefore assert foo and assert_equal true, foo do different things - the latter is more specific. It was noted in #209 that this cop and RefuteFalse are not safe for autocorrect. Nagging a user who needs to test a value is exactly equal to true is not a matter of style, but of substance.
Is your feature request related to a problem? Please describe.
Yes. I commonly need to assert a test result is
true
, rather than a truthy value. The way to do this in Minitest isassert_equal true, foo
.Describe the solution you'd like
I disable this cop in every project and would simply like it disabled by default. Those that like it can enable it.
Describe alternatives you've considered
I guess I could ask @zenspider to add an
assert_true
andassert_false
to Minitest..Additional context
Minitest does not have an
assert_true
assertion,assert
always passes on any truthy value. Thereforeassert foo
andassert_equal true, foo
do different things - the latter is more specific. It was noted in #209 that this cop andRefuteFalse
are not safe for autocorrect. Nagging a user who needs to test a value is exactly equal totrue
is not a matter of style, but of substance.