O'Reilly logo

Effective Testing with RSpec 3 by Myron Marston, Ian Dees

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

We cover:

  • How to generate readable documentation from your specs
  • How to identify the slowest examples in a suite
  • How to run just the specs you care about at any given moment
  • How to mark work in progress and come back to it later

Chapter 2From Writing Specs to Running Them

You’ve installed RSpec and taken it for a test drive. You’ve written a few specs and gotten a feel for how they’re different from test cases in traditional frameworks. You’ve also seen a few ways to trim repetition from your examples.

In the process, you’ve applied the following practices:

  • Structuring your examples logically into groups
  • Writing clear expectations that test at the right level of detail
  • Sharing common setup code across specs

RSpec is designed around these habits, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required