Comparing Costs and Benefits

We hope you’re convinced that BDD and RSpec can help you build good designs, and build them quickly. It’s important to acknowledge the costs of what we do, whether we’re talking about the minutiae of a single example or an entire approach to software development.

Writing Specs

Every spec takes time to write. That’s why so many of the habits you’ve been practicing—outlining several examples at once, or creating reusable helper code, for instance—revolve around saving time.

Running the Entire Suite

Over the lifetime of a BDD project, your specs will run often, perhaps even thousands or tens of thousands of times. The time it takes to run the suite of specs will be multiplied by that huge number.

Consider the difference ...

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.