O'Reilly logo

Rails 4 Test Prescriptions by Noel Rappin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

A Word About Tools, Best Practices, and Teaching TDD

There are two test libraries in general use in the Rails community—Minitest and RSpec—meaning I had a choice of which tool to use as the primary library in this book. The book is about how to test Rails in general, and therefore the details of the testing library in use are secondary to most of it, but still, the examples have to be presented using one tool or the other.

Minitest is part of the Ruby Standard Library and is therefore available everywhere you might use Ruby (1.9 and up). It has a straightforward syntax that is the Ruby translation of the original SUnit and JUnit libraries (for Smalltalk and Java, respectively), and it is the default alternative for a new Rails project.

RSpec ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required