View Source Fixtures behaviour (Fixtures v0.0.11)

Documentation for Fixtures.

Summary

Callbacks

Create a fixture.

Create and then persist a fixture.

Callbacks

@callback create(term()) :: {:ok, term()} | {:error, atom()}

Create a fixture.

@callback persist(term()) :: {:ok, term()} | {:error, atom()}

Create and then persist a fixture.

Functions

Link to this macro

__using__(opts \\ [])

View Source (macro)

Documentation for Fixtures.

Link to this function

create(module, opts \\ [])

View Source
@spec create(module(), term()) :: {:ok, term()} | {:error, term()}
Link to this function

create!(module, opts \\ [])

View Source
@spec create!(module(), term()) :: term() | no_return()
Link to this macro

fixture(block)

View Source (macro)

Create a fixture.

Link to this macro

fixture(model_or_opts, block)

View Source (macro)

Create a fixture.

Link to this macro

fixture(model, opts, block)

View Source (macro)

Create a fixture.

Link to this function

persist(module, opts \\ [])

View Source
@spec persist(module(), term()) :: {:ok, term()} | {:error, term()}
Link to this function

persist!(module, opts \\ [])

View Source
@spec persist!(module(), term()) :: term() | no_return()