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

Okay, Funny Man, What Makes a Good Set of Model Tests?

There are a lot of different, sometimes conflicting, goals for tests. It’s hard to know where to start your TDD process, how many tests to write, and when you are done. The classic description of the process—write a simple test, make it pass, then refactor—doesn’t provide a lot of affirmative guidance or direction for the larger process of adding a feature.

A TDD Metaprocess

Here’s a metaprocess that reflects how I write a new business logic feature. (I handle view logic a little differently.) This process is more of a guideline than a hard-and-fast checklist. As the logic we are working on gets more complex, and the less we know about the implementation when we start, the closer we should ...

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