Jeff Dean's blog



Jeff DeanJeff Dean
Rolling your own object creation methods for specs
edit Posted by Jeff Dean on Saturday October 22, 2011 at 11:33PM

Lately my favorite way to create objects in my spec suite is to use an object mother pattern. There are a number of object mother libraries to choose from (see ruby toolbox for a few), but it's such an easy pattern to implement that lately I've just been rolling my own. In this post I'll describe what I've been using recently and why I've chosen it over using gems.