View Source Given.Step behaviour (given_exunit v1.22.191)
Behaviour that documents the return values of a given, when or then step.
Summary
Types
ExUnit test case context
Return of each step has the following effect on the context
Tuple representing the parsed clause
Types
@type context() :: map()
ExUnit test case context
Return of each step has the following effect on the context:
- empty list - no effect
- false - fail with a RuntimeError
- list of atoms - remove the given keys from the context
- keyword list - put the items into the context
- other - context is not changed
- true - context is not changed
@type step() :: tuple()
Tuple representing the parsed clause
Callbacks
Setup the state of the world.
Normally returns a keyword list of one or more values to be appended to the context for future steps.
Run assertions on the context.
Normally would not change the context so return an empty list.
Execute the behaviour.
Normally returns a keyword list of one or more values to be appended to the context for future steps.