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?
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With