I’ve been toying with “Factory Girl”:http://www.thoughtbot.com/projects/factory_girl lately. The code I’m currently working on needs to generate lots of data before tests run and Factory Girl is handling this well compared to fixtures or coding my own data generators. So, in some unrelated toying with “DataMapper”:http://datamapper.org/doku.php, I came to wonder if Factory Girl and DataMapper play nicely together.
Turns out they do! The only hitch is you need @dm-validations@ in addition to @dm-core@. Since no one seems to have written this up yet, I thought I’d “share my results”:http://gist.github.com/49017.