Spectator::StubModifiers
Mixin intended for Stub to return new, modified stubs.
Instance methods
and_raise(exception_class : Exception.class, message)
Returns a new stub that raises an exception.
with(constraint : AbstractArguments | Nil)
Returns a new stub of the same type with constrained arguments.
with(*args, **kwargs, &block : AbstractArguments -> T) forall T
Returns a new stub with an argument constraint.
with_constraint(constraint : AbstractArguments | Nil)
Returns a new stub of the same type with constrained arguments.