View Source ESpec.Before (ESpec v1.9.2)

Defines 'before' macro. If before block returns {:ok, key: value}, the {key, value} is added to an 'exapmle dict'. The dict can be accessed in another before, in let, and in example by shared (shared[:key]).

Summary

Functions

Struct has 'spec' module name and random function name.

Adds %ESpec.Before structs to the @context and defines a function with random name which will be called when example is run.

Functions

Link to this function

%ESpec.Before{}

View Source (struct)

Struct has 'spec' module name and random function name.

Link to this macro

before(keyword)

View Source (macro)

Adds %ESpec.Before structs to the @context and defines a function with random name which will be called when example is run.