January 18, 2011
Seeing your tests pass is a great feeling. Waiting a long time for it—not so much. Faster tests mean a happier developer!
Another way to speed up your tests is to upgrade your project to Ruby 1.9.2. Here’s my Rails on 1.9.1 in Production: Just do it post.
Test suite under Ruby 1.8.6: real 3m57.156s
Test suite under Ruby 1.9.1: real 2m42.533s
A 31% speedup is nothing to sneeze at! If you have the ability, go Ruby 1.9.2 for faster tests.
As I pointed out a few weeks ago, dropping an SSD in my Macbook Pro cut my test runs in half. It’s not cheap, but if you spend your day on your computer, it’s well worth it.