re: Is Minitest::Assertions#assert Ever the Best Choice? VIEW POST


Testing consists of the following.

  1. Run some code
  2. Verify that it did what you expected

A simple assert embodies step 2.

Everything else is syntactic sugar that introduces complexity and brittleness to your project. It's true that simple assert messages can be obtuse, but this is easily addressed with custom messages as Brian recommended. Also, odds are pretty good that you'll be adding a breakpoint and debugging the failure anyway.

code of conduct - report abuse