struct Spectator::Allow(T)


Targets a stubbable object.

This type is effectively part of the mock DSL. It is primarily used in the mock DSL to provide this syntax:


Defined in:



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 : T) #

Creates the stub target.

The target must be a kind of Stubbable or StubbedType.

[View source]

Instance Method Detail

def to(stub : Stub) : Nil #

Applies a stub to the targeted stubbable object.

[View source]