ExMachina
Create test data for Elixir applications
... in the test environment. build/2 is a function call. As such, it gets evaluated immediately. By default, ExMachina will merge the attributes you pass into build/insert into your factory. But if you want full control of your attributes, you can define your factory as accepting one argument, the attributes being passed into your factory.