katuma icon indicating copy to clipboard operation
katuma copied to clipboard

Use .build for dependent factories

Open sauloperez opened this issue 9 years ago • 0 comments

Investigate whether we can replace .create with .build to build a factory's dependencies in https://github.com/coopdevs/katuma/blob/develop/engines/suppliers/spec/factories.rb.

Now, when building an order factory, we persist a user an a group in the database, no matter what FactoryGirl method was used; either .build or .create. This may become a performance bottleneck when creating many orders and also looses the point of FactoryGirl's .build or even .build_stubbed.

sauloperez avatar Jan 22 '17 13:01 sauloperez