Testing
2 exercises work on this concept, by writing code in the browser.
In Practice
- Counting the rows of several tables in one assertion assertDatabaseCount() accepts an array: the expected number of rows in each table, checked in a single assertion.
- Checking that an email is sent only once assertSentOnce() and assertSentOnDemandOnce(): the Mail and Notification fakes finally say “exactly once” in one word.