Mocks::ProcStub(T)
Inherits Mocks::Stub < Mocks::StubModifiers < Reference < Object
Stub that calls a proc and returns its return value.
Constructors
new(method_name : Symbol, proc : -> T, arguments : AbstractArgumentsPattern | Nil = nil)
Sourcenew(method_name : Symbol, arguments : AbstractArgumentsPattern | Nil = nil, &proc : -> T)
SourceInstance methods
call(args : Args, return_type : U.class = Nil) forall Args, U
Invokes the stub. args are the arguments passed to the method call. The return_type indicates the type expected to be returned by the stub. The type returned by this method must match return_type.