Writing specs isn’t the goal of using RSpec—it’s the benefits those specs provide. Let’s talk about those benefits now; they’re not all as obvious as “specs catch bugs.”
Specs increase confidence in your project. We’re not talking about the simplistic view that if your specs pass, your program is bug-free (we’ve been programming in the real world for far too long to believe that fairy tale).
When we say confidence, we mean that a well-written spec can provide evidence in favor of certain claims about your code. For instance:
The “happy path” through a particular bit of code behaves the way you want it to.
A method detects and reacts to an error condition you’re anticipating.
That last feature ...