Minitest assert_equals order style
June 23, 2025
I find myself pulling up this page from a Minitest Ruby Style Guide on the argument order for assert_equal all the time, but I always have to squint at it longer than I'd like to see what I need to see.
And yes, I'm aware that I could put a sticky note with this information on my desk.
Anyways. Do it like this:
assert_equal(expected, actual)