View Source mix factory_ex.gen (factory_ex v0.3.4)

This can be used to generate factories for usage with ecto --repo is required

Example

$ mix factory_ex.gen --repo MyApp.Repo MyApp.Accounts.User
$ mix factory_ex.gen --repo MyApp.Repo MyApp.Accounts.User MyApp.Accounts.Role

Options

  • dirname - Set directory name to generate into ../my_app/test/support/factory/
  • force - Force create files, no confirmations
  • quiet - No output messages

Summary

Functions

Link to this function

ensure_schema_counter_start_added(opts)

View Source
Link to this function

generate_factory(ecto_schema, repo, opts)

View Source
Link to this function

matching_faker_functions(field)

View Source

Callback implementation for Mix.Task.run/1.