katuma
katuma copied to clipboard
Use .build for dependent factories
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.