Sha256: 5eb7227902098ec486f8d0e4a648f126b4380b87626ba43497ffdab335612fa1

Contents?: true

Size: 289 Bytes

Versions: 6

Compression:

Stored size: 289 Bytes

Contents

require 'rspec/expectations'

RSpec::Matchers.define :request_for do |h|
  match do |actual|
    begin
      !h.key?(:uri) || actual.uri == h[:uri] &&
        !h.key?(:method) || actual.method == h[:method] &&
          !h.key?(:headers) || actual.to_hash == h[:headers]
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
resync-client-0.2.4 spec/rspec_custom_matchers.rb
resync-client-0.2.3 spec/rspec_custom_matchers.rb
resync-client-0.2.1 spec/rspec_custom_matchers.rb
resync-client-0.1.2 spec/rspec_custom_matchers.rb
resync-client-0.1.1 spec/rspec_custom_matchers.rb
resync-client-0.1.0 spec/rspec_custom_matchers.rb