==(other)
click to toggle source
def ==(other)
other.is_a?(self.class) &&
other.expected_hash == self.expected_hash
end
eql?(other)
click to toggle source
inspect()
click to toggle source
def inspect
"hash_including(#{expected_hash.inspect})"
end
wildcard_match?(other)
click to toggle source
def wildcard_match?(other)
self == other || (
other.is_a?(Hash) &&
expected_hash.all? { |k, v|
other.key?(k) && other[k] == expected_hash[k]
}
)
end