class RSpec::Mocks::ArgumentMatchers::HashExcludingMatcher

Public Class Methods

new(expected) click to toggle source
# File lib/rspec/mocks/argument_matchers.rb, line 71
def initialize(expected)
  @expected = expected
end

Public Instance Methods

==(actual) click to toggle source
# File lib/rspec/mocks/argument_matchers.rb, line 75
def ==(actual)
  @expected.none? {|k,v| actual.has_key?(k) && v == actual[k]}
rescue NoMethodError
  false
end
description() click to toggle source
# File lib/rspec/mocks/argument_matchers.rb, line 81
def description
  "hash_not_including(#{@expected.inspect.sub(/^\{/,"").sub(/\}$/,"")})"
end