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 install RSpec and write your first spec
  • How to organize your specifications using describe and it
  • How to verify desired outcomes with expect
  • How to interpret test failures
  • How to keep your specs free of repeated setup code

Chapter 1Getting Started With RSpec

RSpec 3 is a productive Ruby test framework. We say productive because everything about it—its style, API, libraries, and settings—are designed to support you as you write great software.

Writing effective tests helps you toward that goal of shipping your application. We have a specific definition of effective here: does this test pay for the cost of writing and running it? A good test will provide at least one of these benefits:

  • Design guidance: helping you distill all those ...

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