ESpec.Example
Defines macros ‘example’ and ‘it’. These macros defines function with random name which will be called when example runs. Example structs %ESpec.Example are accumulated in @examples attribute
Summary↑
Functions
Specs:
- __struct__ :: %ESpec.Example{context: term, description: term, error: term, file: term, function: term, line: term, module: term, opts: term, result: term, status: term}
Expampe struct. description - the description of example, module - spec module, function - random function name, opts - options, file - spec file path, line - the line where example is defined, context - example context. Accumulator for ‘contexts’ and ‘lets’, status - example status (:new, :success, :failure, :pending), result - the value returned by example block or the pending message error - store an error
Description with contexts.
Filters failed examples
Filters pending examples
Filters success examples
Macros
Macros for pending exaples
Example options only
Adds example to @examples and defines function to wrap the spec.
Sends ‘double-underscore __
‘ variable to the example block.
Macros for focused examples
Aliases for example
Macros for skipped examples