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

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

example

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

Options

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

Link to this section Summary

Link to this section 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.