struct

Spectator::Example::Procsy

Inherits Struct / Value / Object

Wraps an example to behave like a Proc. This is typically used for an around_each hook. Invoking #call or #run will run the example.

Constructors

new(example : Example, &proc : -> )

Creates the example proxy. The example should be run eventually. The proc defines the block of code to run when #call or #run is invoked.

Source

Instance methods

call

Invokes the proc.

Source
example

Underlying example that will run.

Source
run

Invokes the proc.

Source
to_s(io : IO) : Nil

Constructs the full name or description of the example. This prepends names of groups this example is part of.

Source
wrap

Creates a new procsy for a block and the example from this instance.

Source

Macros

method_missing(call)

Allow instance to behave like an example.

Source