Want to receive a weekly email containing
the scoop on our new titles along with the
occasional special offer? Just click the button.
(You can always unsubscribe later by editing your
account information).

Give us an email and a password (you can use the password later to log in and
change your preferences). We'll send you a newsletter roughly once a week.

Rails Test Prescriptions: Keeping Your Application Healthy

by Noel Rappin

The chart shows the approximate number of words in each chapter of Rails Test Prescriptions per week. The latest numbers are highlighted—mouse over prior weeks to see their figures.

Rails Test Prescriptions is a comprehensive guide to testing Rails applications, covering Test-Driven Development from both a theoretical perspective (why to test) and from a practical perspective (how to test effectively). It covers the core Rails testing tools and procedures for Rails 2 and Rails 3, and introduces popular add-ons, including RSpec, Shoulda, Cucumber, Factory Girl, and Rcov.

Out of Print

This book is currently out of print.

About this Book

368 pages

Published: 2011-02-17

Release: P1.0 (2011-02-16)

ISBN: 978-1-93435-664-7

Your Ruby on Rails application is sick. It’s got bugs. Nobody remembers what that tricky piece of code was supposed to do, and nobody can tell what it actually does. Deadlines are looming, but every time you make the slightest change to the code, something else breaks.

You need Test-Driven Development (TDD), a proven process for improving the design, maintainability, and long-term viability of software. In TDD, the tests come first, and then code is written to match the expectation of the test. Using TDD means writing better code faster.

Ruby on Rails has unparalleled support for TDD. In addition to the tools that Rails has built-in, a large and thriving testing community adds new tools at an accelerating rate. Rails Test Prescriptions is your guide to the entire Rails testing ecosystem.

Containing both practical code examples and discussion of why testing works, this book starts with the most basic features delivered as part of core Ruby on Rails. Once you’ve integrated those features into your coding practice, you’ll want to use popular third-party testing tools such as RSpec, Shoulda, Cucumber, Factory Girl, and Rcov. Rails Test Prescriptions will show you how to use these tools and when they are appropriate. Rails Test Prescriptions covers both Rails 2 and Rails 3.

If you are a Rails programmer who tests code, this book is an invaluable guide to the latest in available testing tools. If you are a Rails programmer who doesn’t test code, then start testing immediately: this book can help.

About the Author

Noel Rappin is a Senior Consultant at Obtiva. A Rails developer for five years, Noel has spoken at RailsConf and Windy City Rails, and is the author of Professional Ruby on Rails from Wrox Press. A blog relating to this book can be found at http://www.railsrx.com.

Comments and Reviews

Testing is a given in the Rails world, but the varied options can be
daunting if you are just starting to learn the framework. Noel provides
a solid tour of the options and techniques for testing a Rails application
that will help guide you past some of the initial dark corners. If
you are entering the world of Ruby on Rails, I’d recommend keeping a
copy of Rails Test Prescriptions at hand.

—Corey HainesSoftware Journeyman

Noel has dispensed a fantastic collection of prescriptions for all kind
of testing maladies. Whether you are a budding intern, or a highly
specialized surgeon, this book will provide you with the information
you need to improve your testing health.

—Christopher RedingerPrincipalRelevance, Inc.

If you are comfortable working with Rails, yet have no experience writing
tests for it, this book is an excellent resource for getting up to
speed on the most successful tools used to test drive your development.

—Adam Williams(@aiwilliams)

Rails Test Prescriptions is a great resource for anyone interested in
getting better at testing Rails applications. New readers will find many
helpful guides, and experienced readers will discover many lesserknown
tips and tricks.

—Nick GauthierDeveloperSmartLogic Solutions

Rails Test Prescriptions presents a nuanced and unbiased overview
of the tools and techniques professionals use to test their Rails apps
every day. A must-read for any Rails developer, whether you’ve never
written a single test or you’ve written thousands.

—David ChelimskySenior Software EngineerDRW Trading

This a must-have book for those new to testing on a team that thinks, “We don’t have time for testing,” and for experienced developers looking to round out their testing skills. If you want to write better code, deploy with confidence, and accelerate your team’s velocity, you should read this book!