Machinist vs FactoryGirl - pros and cons

Alexey Poimtsev picture Alexey Poimtsev · Jan 25, 2010 · Viewed 9.3k times · Source

I'm working with factory_girl, but looking at the machinist gem. Could you tell me please - what are the pros and cons of migrating to machinist? Have you compared those libs?

Answer

Ryan McGeary picture Ryan McGeary · Jan 26, 2010

Machinist was actually heavily inspired by factory_girl, but varied because machinist's author wanted a different syntax. Since then, factory_girl added different syntax layers to simulate other factory libraries (including machinist's "blueprint" syntax). In other words, both are extremely similar, just with a different default syntax. Personally, I use factory_girl.