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{async: term, context: term, description: term, error: term, file: term, function: term, line: term, module: term, opts: term, result: term, shared: 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’, shared - marks example as shared, 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.
Extracts specific structs from example context
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
Defines examples using another module
Macros for skipped examples