ESpec v1.7.0 ESpec.Example View Source

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

Link to this section Summary

Functions

Example 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, duration - test duration

Context descriptions

Extracts specific structs from example context

Extracts example option

Extracts example options

Filters failed examples

Message for pending examples

Filters pending examples

Message for skipped examples

Filters success examples

Link to this section Functions

Link to this function

%ESpec.Example{} View Source (struct)

Example 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, duration - test duration.

Link to this function

context_descriptions(example) View Source

Context descriptions.

Link to this function

extract(context, module) View Source

Link to this function

extract_befores(example) View Source

Extracts specific structs from example context.

Link to this function

extract_contexts(example) View Source

Link to this function

extract_finallies(example) View Source

Link to this function

extract_option(example, option) View Source

Extracts example option.

Link to this function

extract_options(example) View Source

Extracts example options.

Filters failed examples.

Link to this function

pending_message(example) View Source

Message for pending examples.

Filters pending examples.

Message for skipped examples.

Filters success examples.