ESpec.Before

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 __ (__[:key]).

Source

Summary

__struct__()

Struct has random fuction name

before(list1)

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

Functions

__struct__()

Specs:

  • __struct__ :: %ESpec.Before{function: term, module: term}

Struct has random fuction name.

Source

Macros

before(list1)

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

Source