What’s in This Book

We’ll start with an introduction to test-driven development in general: what it is, why it works, and when to use it. In the next two chapters we’ll walk through a tutorial using RSpec to create tests for a new Rails application. You’ll start testing without using Rails-specific features, and then you’ll start to test Rails functionality. We’ll also talk a bit about what makes testing and tests most valuable.

After that we’ll spend a few chapters going through basic unit tests, talking about models, multiple ways of generating data for tests, and using test doubles to simulate objects and specify hard-to-reach states.

Then we’ll zoom out a little bit and talk about end-to-end tests. We’ll also start talking about JavaScript, ...

Get Rails 5 Test Prescriptions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.