class Spectator::MethodCall

Overview

Stores information about a call to a method.

Defined in:

spectator/mocks/method_call.cr

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from class Object

should(matcher : Spectator::Matchers::TypeMatcher(U), message = nil, *, _file = __FILE__, _line = __LINE__) forall U
should(matcher, message = nil, *, _file = __FILE__, _line = __LINE__)
should
, should_eventually(matcher, message = nil, *, _file = __FILE__, _line = __LINE__) should_eventually, should_never(matcher, message = nil, *, _file = __FILE__, _line = __LINE__) should_never, should_not(matcher : Spectator::Matchers::TypeMatcher(U), message = nil, *, _file = __FILE__, _line = __LINE__) forall U
should_not(matcher : Spectator::Matchers::NilMatcher, message = nil, *, _file = __FILE__, _line = __LINE__)
should_not(matcher, message = nil, *, _file = __FILE__, _line = __LINE__)
should_not

Constructor Detail

def self.new(method : Symbol, arguments : AbstractArguments = Arguments.none) #

Creates a method call.


[View source]

Class Method Detail

def self.build(method : Symbol, *args, **kwargs) #

Creates a method call from within a method. Takes the same arguments as FormalArguments.build but with the method name first.


[View source]
def self.capture(method : Symbol, *args, **kwargs) #

Creates a method call by splatting its arguments.


[View source]

Instance Method Detail

def arguments : AbstractArguments #

Arguments passed to the method.


[View source]
def inspect(io : IO) : Nil #

Constructs a string containing the method name and arguments.


[View source]
def method : Symbol #

Name of the method.


[View source]
def to_s(io : IO) : Nil #

Constructs a string containing the method name and arguments.


[View source]