English 中文(简体)
Machinist vs FactoryGirl - pros and cons
原标题:

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?

最佳回答

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.

问题回答

Actually, Machinist has a big advantage over Factory Girl: it doesn t hit the DB for associated objects. Look here:

Machinist vs Factory Girl: Machinist win!

Still not sure about how Machinist handles this, but anyhow it could be a huge performance boost for your test base.

I ve not used machinist before, but I can say factory_girl is quite easy to use, extend and rip out any rails-centricness it has to be used in any type of project.





相关问题
Selenium not working with Firefox 3.x on linux

I am using selenium-server , selenium rc for UI testing in my application . My dev box is Windows with FireFox 3.5 and every thing is running fine and cool. But when i try to run selenium tests on my ...

Best browser for testing under Safari Mobile on Linux?

I have an iPhone web app I m producing on a Linux machine. What s the best browser I can use to most closely mimic the feature-limited version of Safari present on the iPhone? (It s a "slimmed down" ...

Code Coverage Tools & Visual Studio 2008 Pro

Just wondering what people are using for code coverage tools when using MS Visual Studio 2008 Pro. We are using the built-in MS test project and unit testing tool (the one that come pre-installed ...

Is there any error checking web app cralwers out there?

Wondering if there was some sort of crawler we could use to test and re-test everything when changes are made to the web app so we know some new change didn t error out any existing pages. Or maybe a ...

热门标签