Spectator::LazyDouble(Messages)
Inherits Spectator::Double / Spectator::Stubbable / Reference / Object
Stands in for an object for testing that a SUT calls expected methods.
Handles all messages (method calls), but only responds to those configured.
Methods called that were not configured will raise UnexpectedMessage.
Use #_spectator_define_stub to override behavior of a method in the double.
Only methods defined in the double's type can have stubs.
New methods are not defines when a stub is added that doesn't have a matching method name.
Constructors
new(_spectator_double_name = nil, _spectator_double_stubs = [] of Stub, **messages : **Messages)
Source