Sha256: e20ad08886a32db8cc52aeeba470bc2695fc50a43cdd1d6cb91e7c8385dfe3ad

Contents?: true

Size: 485 Bytes

Versions: 16

Compression:

Stored size: 485 Bytes

Contents

# frozen_string_literal: true

module WebMock
  module Matchers
    # this is a based on RSpec::Mocks::ArgumentMatchers::HashExcludingMatcher
    # https://github.com/rspec/rspec-mocks/blob/master/lib/rspec/mocks/argument_matchers.rb
    class HashExcludingMatcher < HashArgumentMatcher
      def ==(actual)
        super { |key, value| !actual.key?(key) || value != actual[key] }
      end

      def inspect
        "hash_excluding(#{@expected.inspect})"
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 5 rubygems

Version Path
webmock-3.25.1 lib/webmock/matchers/hash_excluding_matcher.rb
webmock-3.25.0 lib/webmock/matchers/hash_excluding_matcher.rb
tailscale_middleware-0.0.3 vendor/cache/ruby/3.4.0/gems/webmock-3.24.0/lib/webmock/matchers/hash_excluding_matcher.rb
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/webmock-3.23.1/lib/webmock/matchers/hash_excluding_matcher.rb
webmock-3.24.0 lib/webmock/matchers/hash_excluding_matcher.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/webmock-3.23.1/lib/webmock/matchers/hash_excluding_matcher.rb
webmock-3.23.0 lib/webmock/matchers/hash_excluding_matcher.rb
webmock-3.22.0 lib/webmock/matchers/hash_excluding_matcher.rb
webmock-3.21.2 lib/webmock/matchers/hash_excluding_matcher.rb
webmock-3.21.1 lib/webmock/matchers/hash_excluding_matcher.rb
webmock-3.21.0 lib/webmock/matchers/hash_excluding_matcher.rb
webmock-3.20.0 lib/webmock/matchers/hash_excluding_matcher.rb
honeybadger-5.4.0 vendor/bundle/ruby/3.2.0/gems/webmock-3.19.1/lib/webmock/matchers/hash_excluding_matcher.rb
honeybadger-5.3.0 vendor/bundle/ruby/3.2.0/gems/webmock-3.19.1/lib/webmock/matchers/hash_excluding_matcher.rb
webmock-3.19.1 lib/webmock/matchers/hash_excluding_matcher.rb
webmock-3.19.0 lib/webmock/matchers/hash_excluding_matcher.rb