Spectator::ValueStub(T)
Inherits Spectator::TypedStub / Spectator::Stub / Spectator::StubModifiers / Reference / Object
Stub that responds with a static value.
Constructors
new(method : Symbol, value : T, constraint : AbstractArguments | Nil = nil, location : Location | Nil = nil)
Creates the stub.
Instance methods
to_s(io : IO) : Nil
String representation of the stub, formatted as a method call and return value.
with_constraint(constraint : AbstractArguments | Nil)
Returns a new stub with constrained arguments.