Mnemonics.ExMachina v0.1.0 Mnemonics.ExMachina behaviour View Source

ExMachina strategy for Mnemonics.

Link to this section Summary

Callbacks

Builds a factory and inserts it into the database. The arguments are the same as ExMachina.build/2

Builds many factories and inserts them into the database. The arguments are the same as ExMachina.build_list/3

Builds two factories and inserts them into the database. The arguments are the same as ExMachina.build_pair/2

Link to this section Callbacks

Link to this callback insert(factory_name, attrs) View Source
insert(factory_name :: atom(), attrs :: keyword() | map()) :: any()

Builds a factory and inserts it into the database. The arguments are the same as ExMachina.build/2.

Link to this callback insert_list(number_of_records, factory_name, attrs) View Source
insert_list(
  number_of_records :: integer(),
  factory_name :: atom(),
  attrs :: keyword() | map()
) :: list()

Builds many factories and inserts them into the database. The arguments are the same as ExMachina.build_list/3.

Link to this callback insert_pair(factory_name, attrs) View Source
insert_pair(factory_name :: atom(), attrs :: keyword() | map()) :: list()

Builds two factories and inserts them into the database. The arguments are the same as ExMachina.build_pair/2.