DataMapper + Factory Girl

I’ve been toying with “Factory Girl”:www.thoughtbot.com/projects/… 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”: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”:gist.github.com/49017.

Adam Keys @therealadam