The Big One

The best, most general piece of advice I can give about the style and structure of automated tests is this:

Prescription 8Your tests are also code. Specifically, your tests are code that does not have tests.

Your code is verified by your tests, but your tests are verified by nothing.

Having your tests be as clear and manageable as possible is the only way to keep them honest.

Get Rails 4 Test Prescriptions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.