All I Want for Christmas: Rails 4 Test Prescriptions

Share this article

We asked SitePoint authors what developer toys they would want for Christmas, then managed to source them — without relying on Santa.

When I started with Rails, I was introduced to something called “Test-Driven Development”. The theory is simple: write tests for your code, so that you can make changes to it with confidence.

Why I wanted this book

Initially, that sounded like a no-brainer, but when I tried putting it into practice I was assailed with questions and doubts: What do I test? Which tools should I use? Am I even doing it right?

Fast forward several years and the situation hasn’t become much better. Sure, I write tests for my code, but as my apps get more complex, the questions and doubts remain. That’s why “Rails 4 Test Prescriptions” by Noel Rappin was high on my Christmas wish list.

The experience so far

The book doesn’t disappoint. It starts off slowly by covering the basics of testing each part of a Rails app, as well as using mocks, stubs and helpful gems such as webrat. It then gathers pace, moving on to more advanced topics such as testing the security of an app, testing external services (which always caused me headaches) and testing JavaScript.

In summary, although rather dry in places, this book contains something for every Rails developer. Whether it’s getting up to speed with unfamiliar tools, focusing on what to test, or choosing the right tools for the job, this is a veritable must-have for your coding toolbox.

What would you build with more knowledge of Test Driven Development? Answer in the comments, we’ll pick the best answer and send you a copy of the book!

James HibbardJames Hibbard
View Author

Network admin, freelance web developer and editor at SitePoint.

all I want for christmastest-driven development
Share this article
Read Next
Get the freshest news and resources for developers, designers and digital creators in your inbox each week
Loading form