I actually tend to think the opposite, that the other assertions are just sugared-up assert. Sure, the default message isn't informative, but the others aren't any better IMO. Expected 5 to be <= 4 doesn't tell you anything about what those numbers mean or why they're in your tests. I almost always customize the error message to be informative in the context of my own code. Since I'm doing that anyway, it saves headspace not to try and remember alternative constructions, especially when I can never remember which assertions are from Minitest, which are from Rails, and which have been deprecated/removed.
Started out teaching English at Embry-Riddle.
Graded 10,000 essays.
Lesson learned.
Became a mathematics teacher.
Discovered computing.
Never looked back.
Location
Houston TX
Education
Stetson University: B.A., M.A. in English; M.S. in mathematics
Started out teaching English at Embry-Riddle.
Graded 10,000 essays.
Lesson learned.
Became a mathematics teacher.
Discovered computing.
Never looked back.
Location
Houston TX
Education
Stetson University: B.A., M.A. in English; M.S. in mathematics
The place where I use Minitest::Assertions is in developing my own libraries. In that work I allow no bug to live more than a day, so all I really need is the expected/actual values and the line number. And the assertions give me those.
For other work (automated testing for legacy software, for example), I use different toolsets altogether.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I actually tend to think the opposite, that the other assertions are just sugared-up
assert
. Sure, the default message isn't informative, but the others aren't any better IMO.Expected 5 to be <= 4
doesn't tell you anything about what those numbers mean or why they're in your tests. I almost always customize the error message to be informative in the context of my own code. Since I'm doing that anyway, it saves headspace not to try and remember alternative constructions, especially when I can never remember which assertions are from Minitest, which are from Rails, and which have been deprecated/removed.Thanks, Brian. That's interesting.
The place where I use Minitest::Assertions is in developing my own libraries. In that work I allow no bug to live more than a day, so all I really need is the expected/actual values and the line number. And the assertions give me those.
For other work (automated testing for legacy software, for example), I use different toolsets altogether.