rubocop / minitest-style-guide

Best practices for writing your tests
https://minitest.rubystyle.guide
69 stars 15 forks source link

assert_equal(true, actual) is innocent! #61

Open MatzFan opened 1 month ago

MatzFan commented 1 month ago

Style guide should not be offended by assert_equal(true, actual)

Rationale.

andyw8 commented 1 month ago

@zenspider's opinion (2017):

I only use assert if it is supposed to be some truthy value. If it needs to be true specifically, I'll document that with assert_equal instead.

https://github.com/minitest/minitest/issues/724#issuecomment-350516051