4 ms·
There's a better way: get red of can or should, and just assert its truth. - handles_negative_input - handles_zero - returns_http_error_code
by dist1ll 4y ago
There's a better way: get red of can or should, and just assert its truth.
- handles_negative_input
- handles_zero
- returns_http_error_code
- marcosdumay 4y agoPersonally, I prefer to name them as code examples instead of as tests: - negative_input - zero_input - bad_request When you run the "bad_request" test, you should get an error code, but that's on the assert already.
- MetaWhirledPeas 4y agoI don't think this necessarily goes against the author's point. I think encouraging "should" was just a means to an end.