Guidelines

With these definitions in mind, we’ve adopted a set of guidelines for the projects in this book. They’re an adaptation of principles that have served us well in real-world situations. That said, they may not be applicable for every project. Our goal is to give you the tools and context to decide what’s best for your own situation.

Integration specs are harder to write than unit specs, and they run more slowly. Therefore, we prefer to write fewer integration specs and more unit specs.

To make this arrangement possible, we need to keep our interfaces to external resources small and well defined. That way, we only have to write a few integration specs for these interfaces. Our faster unit specs can easily substitute fake versions of ...

Get Effective Testing with RSpec 3 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.