Marking Work in Progress

In BDD, you’re typically working on getting just one spec at a time to pass. Trying to tackle too many features at once leads to the kinds of complicated, untestable designs that BDD seeks to avoid.

On the other hand, it can be extremely productive to sketch out several examples in a batch. You’re thinking of all the things a software component needs to do, and you want to capture the ideas so you don’t forget anything. RSpec supports this workflow really well, through pending examples.

Starting With the Description

While you were writing the coffee spec earlier, you may have been thinking ahead to other properties of coffee with milk: it’s lighter in color, cooler, and so on. While these behaviors are on your mind, ...

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.