FactoryGirl:create the same object multiple times
In one of my rspec test, i am creating multiple objects from the same factory
Eg
FactoryGirl.create(:model_1)
FactoryGirl.create(:model_1)
FactoryGirl.create(:model_1)
Is there a method that factory_girl provides to do this in one line
I know that i can do
3.times {FactoryGirl.create(:model_1)}
But i am looking for something that factory_girl provides for creating
multiple objects of the same model.
No comments:
Post a Comment