struct Spectator::ContextDelegate


Stores a test context and a method to call within it.

Defined in:



Class Method Summary

Instance Method Summary

Instance methods inherited from class Object

should(matcher, message = nil) should, should_eventually(matcher, message = nil) should_eventually, should_never(matcher, message = nil) should_never, should_not(matcher, message = nil) should_not

Constructor Detail

def : Context, method : ContextMethod) #

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.

[View source]

Class Method Detail

def self.null(&block : -> _) #

Creates a delegate with a null context. The context will be ignored and the block will be executed in its original scope.

[View source]

Instance Method Detail

def call #

Invokes a method in the test context.

[View source]