I’ve got a few apps that I’d like to go back and retroactively build a test suite (RSpec & Cucumber) for, but it’s a little daunting to get that process started.
What would your process be for going back on an existing app and building out a test suite for it?
I recently started tackling adding tests to a bunch of old code myself, and what I found immensely helpful is rcov (I don’t bother with the rcov rails plugin and just cd to test and run a little shell script that runs rcov with the right exclusions and opens the report if the tests all pass.) Then, I started tackling the ones that were closest to 100% coverage and just working up the percentages bit by bit. It’s much more measurable progress than, “Ugh, where do I start with adding tests for this?!”