Skip to content
This repository was archived by the owner on Apr 1, 2024. It is now read-only.

Factory methods

Dmitry Dorogin edited this page Dec 17, 2017 · 3 revisions

Factory methods

Base methods

Model factory provide 2 way to create object

  1. make - Create instance of model and fill it by faked attributes
  2. create - Make model and persist it into database

Faked attributes are defined by Resolvers.

Properties
  • states help resolvers to make models for certain situation.
  • amount Amount of models that will be made. Default is 1.

Clone this wiki locally