machinist

RSpec and Machinist error: Too many open files

情到浓时终转凉″ 提交于 2020-01-12 19:07:05
问题 This morning I am having the following error: 14) Deal on creation sets frozen to false or nil Failure/Error: Unable to find matching line from backtrace Errno::EMFILE: Too many open files - identify -format %wx%h '/var/folders/BJ/BJcTANEBFxWcan28U2YEKE+++TI/-Tmp-/stream20120229-36866-4l1sa8.gif[0]' # ./spec/support/blueprints.rb:29:in `block in <top (required)>' Specs are so damn slow (even with spork) so they are useless. It takes 9 minutes to run 20 examples in a model. Line 29 in

RSpec and Machinist error: Too many open files

不羁的心 提交于 2020-01-12 19:05:26
问题 This morning I am having the following error: 14) Deal on creation sets frozen to false or nil Failure/Error: Unable to find matching line from backtrace Errno::EMFILE: Too many open files - identify -format %wx%h '/var/folders/BJ/BJcTANEBFxWcan28U2YEKE+++TI/-Tmp-/stream20120229-36866-4l1sa8.gif[0]' # ./spec/support/blueprints.rb:29:in `block in <top (required)>' Specs are so damn slow (even with spork) so they are useless. It takes 9 minutes to run 20 examples in a model. Line 29 in

How do I get cucumber and pickle working with mongo_mapper, machinist, and machinist_mongo?

爱⌒轻易说出口 提交于 2019-12-10 22:23:31
问题 I would like to get machinist, machinist_mongo, mongo_mapper, cucumber and pickle to play nice together. Currently I have machinist with all my blueprints configured and am using cucumber to do BDD. So far so good. My problem is I am having to write custom cucumber steps for all of my machinist blueprints. It is not really a problem per se, since it is not stopping me in my tracks, but as a .NET dev checking out rails, it feels really dirty to have to write a step for each blueprint whereas

Rails integration test with the devise gem

老子叫甜甜 提交于 2019-12-10 03:39:45
问题 I want to write an rails integration test (with ActionDispatch::IntegrationTest ). I am using devise for authentication and machinist for test models. I cannot successfully sign in. Here is a simple example: class UserFlowsTest < ActionDispatch::IntegrationTest setup do User.make end test "sign in to the site" # sign in post_via_redirect 'users/sign_in', :email => 'foo@bar.com', :password => 'qwerty' p flash p User.all end Here is the debug output: Loaded suite test/integration/user_flows

Machinist vs FactoryGirl - pros and cons

冷暖自知 提交于 2019-12-04 08:48:01
问题 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? 回答1: 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

Machinist vs FactoryGirl - pros and cons

…衆ロ難τιáo~ 提交于 2019-12-03 00:58:15
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? Ryan McGeary 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. MetalElf0 Actually, Machinist has a big