ESpec.ExampleRunner

Source

Summary

run(example)

Runs one specific example and returns an %ESpec.Example{} struct. The sequence in the following:

  • evaluates ‘befores’ and ‘lets’. ‘befores’ fill the map for __, ‘lets’ can access __ ;
  • runs ‘example block’;
  • evaluate ‘finally’s’ The struct has fields [status: :success, result: result] or [status: failed, error: error] The result is the value returned by example block. error is a %ESpec.AssertionError{} struct
run_example(example)
run_pending(example)
run_skipped(example)

Functions

run(example)

Runs one specific example and returns an %ESpec.Example{} struct. The sequence in the following:

  • evaluates ‘befores’ and ‘lets’. ‘befores’ fill the map for __, ‘lets’ can access __ ;
  • runs ‘example block’;
  • evaluate ‘finally’s’ The struct has fields [status: :success, result: result] or [status: failed, error: error] The result is the value returned by example block. error is a %ESpec.AssertionError{} struct.
Source
run_example(example)
Source
run_pending(example)
Source
run_skipped(example)
Source