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

Set Expectations

You aren’t going to convert this beast of an old project into a marvel of elegant, test-driven code overnight. And trying to do so is probably not a good idea. 
When you’re exposed to a new codebase, you should do the following:

  • If it makes you feel better, for 15 minutes shake your fists and curse the previous programmer’s name (doubly effective if the previous programmer was you).

  • Then move on and start working with the codebase. It’s yours now.

If you’re like me, the temptation to immediately fix everything and/or add tests to everything is pretty strong. Lie down until the feeling passes.

There are two reasons it’s a bad idea to do nothing but add test coverage to a legacy project first thing. From a purely logistical standpoint, ...

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