module Mocks::DSL::AllowSyntax

Overview

Methods to enable the "allow" syntax. This module should be included wherever necessary to specify DSL methods.

Defined in:

mocks/dsl/allow_syntax.cr

Instance Method Summary

Instance Method Detail

def allow(stubbable : Stubbable) #

Wrapper for a stubbable object. Begins the fluent language for defining stubs for an object.

The stubbable argument must be a mock or double (something that can be stubbed).

allow(dbl).to receive(:foo)

[View source]
def allow(object) #

Fallback method that provides a helpful compiler error message for types that aren't stubbable.


[View source]