struct

Mocks::Allow(T)

Inherits Struct < Value < Object

Wrapper for stubbable objects to use in the "allow" syntax.

Constructors

new(proxy : Proxy(T))

Creates the wrapper. Takes a proxy from the stubbable object.

Source

Instance methods

to(stub : Stub)

DSL method to apply a stub.

allow(dbl).to receive(:foo)
Source
to(collection : StubCollection)

DSL method to apply a collection of stubs.

allow(dbl).to receive(answer: 42, foo: "bar")
Source