class Shoulda::Matchers::Doublespeak::MethodCall
@private
def ==(other)
def ==(other) other.is_a?(self.class) && method_name == other.method_name && args == other.args && block == other.block && double == other.double && object == other.object end
def initialize(args)
def initialize(args) @method_name = args.fetch(:method_name) @args = args.fetch(:args) @caller = args.fetch(:caller) @block = args[:block] @double = args[:double] @object = args[:object] @return_value = nil end
def inspect
def inspect "#<#{self.class.name} #{to_hash.inspect}>" end
def to_hash
def to_hash { method_name: method_name, args: args } end
def with_return_value(return_value)
def with_return_value(return_value) dup.tap do |call| call.return_value = return_value end end