struct Spectator::Mocks::Allow(T)
- Spectator::Mocks::Allow(T)
- Struct
- Value
- Object
Overview
Wrapper for stubbable objects to use in the "allow" syntax.
Defined in:
spectator/mocks/allow.crConstructors
-
.new(proxy : Proxy(T))
Creates the wrapper.
Instance Method Summary
-
#to(stub : Stub)
DSL method to apply a stub.
-
#to(collection : StubCollection)
DSL method to apply a collection of stubs.
Constructor Detail
Creates the wrapper. Takes a proxy from the stubbable object.
Instance Method Detail
def to(collection : StubCollection)
#
DSL method to apply a collection of stubs.
allow(dbl).to receive(answer: 42, foo: "bar")