Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Comparing Factory Girl with Fabrication

Tags:

There seems to be few resources about the fabrication gem, and I couldn't find a good comparison of the features that distinguish it from factory_girl. As of versions fabrication-2.2.3 and factory_girl-4.0.0, I can hardly find a difference. How do these gems compare? What can make fabrication a better choice and why? Have they both converged?

like image 585
Hosam Aly Avatar asked Aug 29 '12 13:08

Hosam Aly


People also ask

What does Factory Girl do?

Factory Girl provides a well-developed ruby DSL syntax for defining factories like user, post or any other object—not only Active Record objects. “Plain” Ruby classes are perfectly fine. You start by setting up a define block in your factories. rb file.


1 Answers

Just for what it's worth, I find fabrication to be faster, and I've experienced fewer errors with it. I think the big popularity gap is mostly because fabrication is much newer.

like image 199
Andrew Avatar answered Sep 28 '22 07:09

Andrew