The FIRST criteria for unit tests
Topics: Testing
The FIRST acronym covers five attributes of good unit tests. It was first used by Tim Ottinger and Jeff Langr.
- F - Fast - Tests must be fast to run. The faster they run, the more you’re likely to run them.
- I - Isolated - Each test should have a single reason to fail
- R - Repeatable - Tests should have the same result every time you run them.
- S - Self-verifying - Results should not be open to human interpretation. They should be binary (e.g., Red/Green).
- T - Timely - Write the tests before you write the code.
from https://www.honeybadger.io/blog/minitest-rspec-rails/