class

Spectator::ExceptionStub

Inherits Spectator::Stub / Spectator::StubModifiers / Reference / Object

Stub that raises an exception.

Constructors

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

Creates the stub.

Source

Instance methods

call(call : MethodCall) : Nil

Invokes the stubbed implementation.

Source
to_s(io : IO) : Nil

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

Source
with_constraint(constraint : AbstractArguments | Nil)

Returns a new stub with constrained arguments.

Source