views:

13

answers:

1

I'm using following construct in a cucumber step definition.

Given "I have following stuff" do
   Model.delete_all

   list.each { |i| Model.make!(:name => i) } 
end

(make! is from machinist 2).

Above step fails with INSERT statement timeout. When I open up a console for test, environment, I can execute each statement without an issue. Also, if I disable transactional features timeout goes away.

Can anyone please help me fix this? (This ran without an issue with rails 2.x)

(Database MySQL)

A: 

This turned out be an issue with machinist beta version I was using. I'm not 100% sure what was wrong, but when I used pure ActiveRecord code to create the objects, instead of make! it worked.

Then I switched to Factory_Girl instead of machinist, and now it works fine.

Raiden