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

From Acceptance Specs to Unit Specs

We should take a moment to revisit what we mean by “unit specs.” The common term unit testing means different things to different people—or even to the same person on different projects. Unit tests typically involve isolating a class or method from the rest of the code. The result is faster tests and easier-to-find errors.

Where unit testing approaches differ is the degree of isolation; that is, whether to remove every possible dependency or to test a related group of collaborating objects together. In this book, we’ll use unit spec to refer to the fastest, most isolated set of tests for a particular project. For more information, see Martin Fowler’s article on the subject.[35]

With the unit tests in this ...

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