class RSpec::Mocks::ArgumentMatchers::DuckTypeMatcher
@private
Public Class Methods
new(*methods_to_respond_to)
click to toggle source
# File lib/rspec/mocks/argument_matchers.rb, line 263 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 267 def ===(value) @methods_to_respond_to.all? { |message| value.respond_to?(message) } end
description()
click to toggle source
# File lib/rspec/mocks/argument_matchers.rb, line 271 def description "duck_type(#{@methods_to_respond_to.map(&:inspect).join(', ')})" end