Hacker News new | ask | show | jobs
by gyardley 5048 days ago
Yep, I'm trying to dig myself out from this problem now.

The Rails Tutorial (railstutorial.org) uses Factory Girl and integration tests for just about everything, which is a fast enough approach for its toy application, but I've found that when your application gets more complex your test suite takes forever to run, and setting up the tests gets more and more painful (especially when you start dealing with external APIs).

Does anyone have any opinions on the best resource for teaching effective unit testing in Rails? I'd love to speed up my test suite while not losing coverage.

1 comments

It's not really focused on unit testing (though it does cover it) so much as it's focused on good design, but the two are related, so I found Avdi's "Objects on Rails" [1] helpful.

[1]: http://objectsonrails.com/

I'm not sure if it's the best resource, though. I'd love to hear other opinions.