class RSpec::Mocks::ArgumentMatchers::DuckTypeMatcher
@private
Public Class Methods
Source
# File lib/rspec/mocks/argument_matchers.rb, line 307 def initialize(*methods_to_respond_to) @methods_to_respond_to = methods_to_respond_to end
Public Instance Methods
Source
# File lib/rspec/mocks/argument_matchers.rb, line 311 def ===(value) @methods_to_respond_to.all? { |message| value.respond_to?(message) } end
Source
# File lib/rspec/mocks/argument_matchers.rb, line 315 def description "duck_type(#{@methods_to_respond_to.map(&:inspect).join(', ')})" end