class

Spectator::NullDouble

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 return self. Doubles should be defined with the #define macro.

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.

Macros

method_missing(call)

Handles all undefined messages. Returns stubbed values if available, otherwise delegates to #_spectator_abstract_stub_fallback.

Source