ESpec.Let (ESpec v1.10.0)

View Source

Defines 'let', 'let!' and 'subject' macros. 'let' and 'let!' macros define named functions with cached return values. The 'let' evaluate block in runtime when called first time. The 'let!' evaluates as a before block just after all 'befores' for example. The 'subject' macro is just an alias for let to define subject.

Summary

Functions

Struct keeps the name of variable and random function name.

Allows to define several 'lets' at once

The macro defines function with random name which returns block value. That function will be called when example is run. The function will place the block value to the Agent dict.

Allows to define several 'lets' at once

let! evaluate block like before

Defines 'let' for error result tuple.

Defines 'let!' for error result tuple.

Defines 'let' for success result tuple.

Defines 'let!' for success result tuple.

Defines overridable lets in shared examples

Defines 'subject'.

Defines 'subject!'.

Functions

%ESpec.Let{}

(struct)

Struct keeps the name of variable and random function name.

let(keyword)

(macro)

Allows to define several 'lets' at once

let(var, list)

(macro)

The macro defines function with random name which returns block value. That function will be called when example is run. The function will place the block value to the Agent dict.

let!(keyword)

(macro)

Allows to define several 'lets' at once

let!(var, list)

(macro)

let! evaluate block like before

let_error(keyword)

(macro)

let_error(var, list)

(macro)

Defines 'let' for error result tuple.

let_error!(keyword)

(macro)

let_error!(var, list)

(macro)

Defines 'let!' for error result tuple.

let_ok(keyword)

(macro)

let_ok(var, list)

(macro)

Defines 'let' for success result tuple.

let_ok!(keyword)

(macro)

let_ok!(var, list)

(macro)

Defines 'let!' for success result tuple.

let_overridable(keywords)

(macro)

Defines overridable lets in shared examples

subject(var)

(macro)

Defines 'subject'.

subject(var, list)

(macro)

subject!(var)

(macro)

Defines 'subject!'.

subject!(var, list)

(macro)