5 things to check with your tests
Unit tests should always check for these five scenarios:
- When there is 0 (zero).
- When there is 1.
- When there are a few.
- When there are many.
- Oops (There’s an exception).
Today-I-learned liked micro-posts. (may move to Posts)
On this page:
Unit tests should always check for these five scenarios:
Minitest-autotest throws a LoadError
exception if the file containing the functions to be tested doesn’t have the .rb
extension.
Reference: Minitest-autotest source code.