module Spectator::StubbedType

Overview

Defines stubbing functionality at the type level (classes and structs).

This module is intended to be extended when a type includes Stubbable.

Defined in:

spectator/mocks/stubbed_type.cr

Instance Method Summary

Instance Method Detail

def _spectator_abstract_stub_fallback(call : MethodCall, type) #

[View source]
def _spectator_abstract_stub_fallback(call : MethodCall) #

[View source]
def _spectator_clear_calls : Nil #

[View source]
def _spectator_clear_stubs : Nil #

[View source]
def _spectator_define_stub(stub : Stub) : Nil #

[View source]
def _spectator_find_stub(call : MethodCall) : Stub | Nil #

[View source]
def _spectator_record_call(call : MethodCall) : Nil #

[View source]
def _spectator_remove_stub(stub : Stub) : Nil #

[View source]
def _spectator_reset : Nil #

Clears all previously defined calls and stubs.


[View source]
def _spectator_stub_fallback(call : MethodCall, type, &) #

[View source]
def _spectator_stub_fallback(call : MethodCall, &) #

[View source]
def _spectator_stub_for_method?(method : Symbol) : Bool #

[View source]