The Tester submodule
You automagically get a submodule of the Examples module. It contains functions used to run tests.
When you use
a variant in your Examples module, like this:
You can think of yourself as also defining a submodule that looks like this:
All of the above functions are common to every variant. The most important is check_workflow. It runs a series of creation and checking steps and reports the results via ExUnit. The tracing options are explained [[[where]]].
Workflow functions
Diagnostic functions
test_data() returns how the results of create_test_data
are stored. There's a lot of repetition in it for convenience, so it's unlikely to be interesting to you.
example(name) returns the portion of the test data that is specific to one example. It's also fairly complicated:
Last updated
Was this helpful?