Search⌘ K
AI Features

Set Expectations

Understand how to set realistic expectations when testing legacy Rails code. Learn to avoid the pitfalls of immediate extensive refactoring and test coverage by taking incremental steps. This lesson helps you balance maintaining working code while improving the codebase with well-tested new features.

We 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 we’re exposed to a new codebase the temptation to immediately fix everything and/or add tests to everything is pretty strong. Lie down until the feeling passes.

Test coverage and legacy code

There are two reasons ...