class Shoulda::Matchers::Doublespeak::MethodCall
@private
Attributes
args[R]
block[R]
caller[R]
double[R]
method_name[R]
object[R]
return_value[RW]
Public Class Methods
new(args)
click to toggle source
# File lib/shoulda/matchers/doublespeak/method_call.rb, line 9 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
Public Instance Methods
==(other)
click to toggle source
# File lib/shoulda/matchers/doublespeak/method_call.rb, line 25 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
inspect()
click to toggle source
# File lib/shoulda/matchers/doublespeak/method_call.rb, line 38 def inspect "#<#{self.class.name} #{to_hash.inspect}>" end
to_hash()
click to toggle source
# File lib/shoulda/matchers/doublespeak/method_call.rb, line 34 def to_hash { method_name: method_name, args: args } end
with_return_value(return_value)
click to toggle source
# File lib/shoulda/matchers/doublespeak/method_call.rb, line 19 def with_return_value(return_value) dup.tap do |call| call.return_value = return_value end end