Class Spec::Mocks::ArgumentMatchers::DuckTypeMatcher

  1. lib/spec/mocks/argument_matchers.rb
Parent: Object

Methods

public class

  1. new

public instance

  1. ==

Public class methods

new (*methods_to_respond_to)
[show source]
# File lib/spec/mocks/argument_matchers.rb, line 92
        def initialize(*methods_to_respond_to)
          @methods_to_respond_to = methods_to_respond_to
        end

Public instance methods

== (value)
[show source]
# File lib/spec/mocks/argument_matchers.rb, line 96
        def ==(value)
          @methods_to_respond_to.all? { |sym| value.respond_to?(sym) }
        end