class RSpec::Mocks::ArgumentMatchers::DuckTypeMatcher

Public Class Methods

new(*methods_to_respond_to) click to toggle source
# File lib/rspec/mocks/argument_matchers.rb, line 87
def initialize(*methods_to_respond_to)
  @methods_to_respond_to = methods_to_respond_to
end

Public Instance Methods

==(value) click to toggle source
# File lib/rspec/mocks/argument_matchers.rb, line 91
def ==(value)
  @methods_to_respond_to.all? {|message| value.respond_to?(message)}
end