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).

  • 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, ...

Get Rails 5 Test Prescriptions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.