Machinist vs FactoryGirl - pros and cons

前端 未结 3 1038
南笙
南笙 2021-02-05 00:56

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?<

3条回答
  •  死守一世寂寞
    2021-02-05 01:19

    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.

提交回复
热议问题