Stores a test context and a method to call within it.
This is a variant of
ContextDelegate that accepts the current running example.
.new(context : Context, method : ExampleContextMethod)
Creates the delegate.
.null(&block : Example -> _)
Creates a delegate with a null context.
#call(example : Example)
Invokes a method in the test context.
Instance methods inherited from class
should(matcher, message = nil)
should_eventually(matcher, message = nil)
should_never(matcher, message = nil)
should_not(matcher, message = nil)
Creates the delegate. The context is the instance of the test context. The method is proc that downcasts context and calls a method on it.
Creates a delegate with a null context. The context will be ignored and the block will be executed in its original scope. The example instance will be provided as an argument to the block.