With my latest Rails project I'm using a new version of Rails than I'd been used (my last job was over a year ago). It seemed to me that the tests had got substantially slower. Problem was fixtures :all
in the test_helper.rb
. I changed that and things got much quicker.
I’m building a Spree site, and the tests are super super slow.
I don’t know if it’s just fixtures though. In fact, I had to add fixtures (in the form of seeds) because there weren’t any and all the standard tests were failing!
And that’s probably because I did some shoddy coding..
Laurence / 10:08am / 11 March 2010
I’d suggest using incremental testing like autotest (which is amazingly awesome) or moving the tests to the server. Running them automatically on the server before the commit or something like that.
With autotest, you can remove all the included Spree tests from your test-code cycle which should speed everything up heaps. That code isn’t going to change so you don’t need to test it every time.
Ryan / 9:46am / 13 March 2010