ESpec v1.4.1 ESpec.ExampleRunner

Contains all the functions need to run a ‘spec’ example.

Summary

Functions

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

  • evaluates ‘befores’ and ‘lets’. ‘befores’ fill the map for shared, ‘lets’ can access shared ;
  • 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

Functions

after_example_actions(assigns, example)
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 shared, ‘lets’ can access shared ;
  • 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.