We cover:
Over the last couple of chapters, you’ve gotten to know RSpec. You’ve written your first few examples and organized them into groups. You’ve seen how to run just a filtered subset of your specs and how to customize output.
All these features of RSpec are designed to make certain habits easy:
None of these habits comes without a cost:
Writing specs takes time.
Running large suites takes time (or requires learning options to trim down the set).
Reading heavily factored specs requires hopping between setup and test code.
We don’t want anyone to take it for granted that the habits we’re forming are good ones. We’d like to show you they’re worth the cost. In this chapter, we’re going to walk you through RSpec’s approach to software development and what makes a good set of specs.