123456789_123456789_123456789_123456789_123456789_

Class: RSpec::Mocks::ArgumentMatchers::ArrayExcludingMatcher Private

Do not use. This class is for internal use only.
Relationships & Source Files
Inherits: Object
Defined in: rspec-mocks/lib/rspec/mocks/argument_matchers.rb

Class Method Summary

Instance Method Summary

Instance Method Details

#===(actual)

[ GitHub ]

  
# File 'rspec-mocks/lib/rspec/mocks/argument_matchers.rb', line 279

def ===(actual)
  actual = actual.uniq
  return false unless (actual & @unexpected).empty?

  actual.none? do |actual_element|
    @unexpected.any? do |unexpected_element|
      RSpec::Support::FuzzyMatcher.values_match?(unexpected_element, actual_element)
    end
  end
rescue NoMethodError
  false
end

#description

[ GitHub ]

  
# File 'rspec-mocks/lib/rspec/mocks/argument_matchers.rb', line 292

def description
  "array_excluding(#{formatted_unexpected_values})"
end

#formatted_unexpected_values (private)

[ GitHub ]

  
# File 'rspec-mocks/lib/rspec/mocks/argument_matchers.rb', line 298

def formatted_unexpected_values
  @unexpected.map do |x|
    RSpec::Support.rspec_description_for_object(x)
  end.join(", ")
end