Sha256: 3b32ddc98a15bb6627bfbd11a904a4f43919a8f6956e917408d476a1a1cd0963

Contents?: true

Size: 495 Bytes

Versions: 69

Compression:

Stored size: 495 Bytes

Contents

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

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

Version data entries

69 entries across 69 versions & 5 rubygems

Version Path
logstash-output-scalyr-0.1.19.beta vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/matchers/hash_including_matcher.rb
logstash-output-scalyr-0.1.18.beta vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/matchers/hash_including_matcher.rb
logstash-output-scalyr-0.1.17.beta vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/matchers/hash_including_matcher.rb
logstash-output-scalyr-0.1.16.beta vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/matchers/hash_including_matcher.rb
logstash-output-scalyr-0.1.15.beta vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/matchers/hash_including_matcher.rb
logstash-output-scalyr-0.1.14.beta vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/matchers/hash_including_matcher.rb
logstash-output-scalyr-0.1.13 vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/matchers/hash_including_matcher.rb
logstash-output-scalyr-0.1.12 vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/matchers/hash_including_matcher.rb
logstash-output-scalyr-0.1.11.beta vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/matchers/hash_including_matcher.rb
webmock-3.13.0 lib/webmock/matchers/hash_including_matcher.rb
webmock-3.12.2 lib/webmock/matchers/hash_including_matcher.rb
webmock-3.12.1 lib/webmock/matchers/hash_including_matcher.rb
webmock-3.12.0 lib/webmock/matchers/hash_including_matcher.rb
webmock-3.11.3 lib/webmock/matchers/hash_including_matcher.rb
logstash-output-newrelic-1.2.0 vendor/bundle/jruby/2.5.0/gems/webmock-3.11.2/lib/webmock/matchers/hash_including_matcher.rb
webmock-3.11.2 lib/webmock/matchers/hash_including_matcher.rb
webmock-3.11.1 lib/webmock/matchers/hash_including_matcher.rb
webmock-3.11.0 lib/webmock/matchers/hash_including_matcher.rb
webmock-3.10.0 lib/webmock/matchers/hash_including_matcher.rb
webmock-3.9.5 lib/webmock/matchers/hash_including_matcher.rb