问题描述
我正在与factory_girl合作,但正在看机械师的瑰宝.您能否告诉我-迁移到机械师的利弊是什么?你比较过那些库吗?
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?
推荐答案
机械师实际上受到了很大的启发 factory_girl ,但由于机械师的作者想要不同的语法而有所不同.从那时起,factory_girl添加了不同的语法层来模拟其他工厂库(包括机械师的蓝图"语法).换句话说,两者非常相似,只是默认语法不同.我个人使用的是factory_girl.
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.
这篇关于机械师vs FactoryGirl-利弊的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!