ESpec.Runner

Defines functions which runs the examples.

Source

Summary

run()

Runs all examples. Uses filter/2 to select examples to run. The options are: TODO

run_example(example)

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

  • evaluates ‘befores’ and fill the map for __;
  • runs ‘lets’ (__ can be accessed inside ‘lets’);
  • 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_examples(examples)

Runs example for specific ‘spec module’

Functions

run()

Runs all examples. Uses filter/2 to select examples to run. The options are: TODO

Source
run_example(example)

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

  • evaluates ‘befores’ and fill the map for __;
  • runs ‘lets’ (__ can be accessed inside ‘lets’);
  • 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_examples(examples)

Runs example for specific ‘spec module’.

Source