Rails 5 Test Prescriptions: Build a Healthy Codebase 1st Edition
Use the Amazon App to scan ISBNs and compare prices.
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Frequently bought together
Customers who viewed this item also viewed
From the Publisher
From the Preface
Throughout the course of this book, you'll learn how to apply a test-driven development (TDD) process to the creation of applications that use Ruby and Rails. I'll talk about how to apply TDD to your daily coding and about the tools and libraries that make testing in Rails easier. The goal is to show you how to apply a test-driven process and automated testing as you build a Rails application. Being test-driven allows you to use testing to explore your code's design. You'll see what tools are available and learn when those tools are best used. Tools come and tools go, so I'm really hoping you come away from this book committed to the idea of writing better code through the small steps of a test-driven development process.
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.
Once we've gone through all that, we'll walk through most of it again using Minitest instead of RSpec.
Once we're done talking about tools, we'll cover specific scenarios for testing, including testing for security and testing third-party services. We'll talk about troubleshooting failing tests and how to improve your test environment and run your tests quickly. And we'll end with the very common case where you need to add tests to untested legacy code.
Who You Are
I'm assuming you're already comfortable with Ruby and Rails and that you don't need this book to explain how to get started creating a Rails application in and of itself. I'm not assuming you have any particular familiarity with testing frameworks or testing tools used within Rails. Over the course of this book, I'll go through the tools that are available for writing tests, and I'll talk about them with an eye toward making them useful in building your application. This is Rails, so naturally I have my own opinions, but the goal with all the tools and all the advice is the same: to help you write great applications that do cool things and still catch the train home.
Changes in This Edition
The Rails testing world has continued to innovate in the four years since Rails 4 Teast Prescriptions, even as the general principles have stayed more or less the same. The entire community, including me, has had more years of experience with these tools, building bigger and better applications, learning what tools work, what tools scale, and what tools don’t.
About the Author
Noel Rappin is the Director of Development at Table XI, and is the author of multiple technical books. Before joining Table XI, Noel ran internal training at Groupon, and has a Ph.D. in educational technology and user-centered design from the GVU Lab at the Georgia Institute of Technology. Find Noel online at noelrappin.com.
- Item Weight : 1.65 pounds
- Paperback : 406 pages
- ISBN-13 : 978-1680502503
- ISBN-10 : 1680502506
- Product Dimensions : 7.5 x 0.83 x 9.25 inches
- Publisher : Pragmatic Bookshelf; 1st Edition (March 6, 2018)
- Language: : English
- Best Sellers Rank: #707,631 in Books (See Top 100 in Books)
- Customer Reviews: