Your Turn

In this chapter, we looked at two ways to configure RSpec: the command-line options and the configure method. Command-line options are easy to discover, and they’re great for one-off changes to RSpec’s behavior. The configure method covers more of RSpec’s behavior and gives you finer-grained control over how RSpec runs.

We’re not asking anyone to memorize the entire set of configuration options. But the ones we’ve shown you here will help you turn RSpec into a comfortable, productive working environment.

Exercises

Now that you’ve seen what a wide array of configuration options RSpec offers, try your hand at using a few of them in these exercises.

Using a Custom Formatter

Find and read the documentation for the following RSpec formatters ...

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.