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
- .new(unexpected) ⇒ ArrayExcludingMatcher constructor Internal use only
Instance Method Summary
- #===(actual) Internal use only
- #description Internal use only
- #formatted_unexpected_values private Internal use only
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