class

Spectator::Stub

Inherits Spectator::StubModifiers / Reference / Object

Untyped response to a method call (message).

Constructors

new(method : Symbol, constraint : AbstractArguments | Nil = nil, location : Location | Nil = nil)

Creates the base of the stub.

Source

Instance methods

===(call : MethodCall)

Checks if a method call should receive the response from this stub.

Source
constraint

Arguments the method must have been called with to provide this response. Is nil when there's no constraint - only the method name must match.

Source
location

Location the stub was defined.

Source
message(io : IO) : Nil

String representation of the stub, formatted as a method call.

Source
message

String representation of the stub, formatted as a method call.

Source
method

Name of the method this stub is for.

Source
to_s(io : IO) : Nil

String representation of the stub, formatted as a method definition.

Source