What You’ve Done

You’ve written an entire (albeit small) piece of Rails functionality, starting with an end-to-end integration test and moving down to unit tests to make each part of the feature work. And it took only one chapter. It goes a lot faster when you don’t stop to explain every line of code.

In the next few chapters you’ll look at model testing, controller testing, and view testing, covering the libraries discussed in this chapter in more detail. You’ll also learn about related topics, such as placing data in tests, testing for security, and testing JavaScript. After that you’ll tackle some wider topics: how to test legacy code, how to keep your tests from becoming legacy code, how to test external services, and the like.

First, though, ...

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.