Sha256: 339997ad823e609089c7b315bb59abd21365e5b6f3e222b4846ff43f84177130

Contents?: true

Size: 353 Bytes

Versions: 18

Compression:

Stored size: 353 Bytes

Contents

RSpec::Matchers.define :match_response do |options|
  defaults = { :code => 200, :headers => {}, :body => "" }
  response = defaults.merge options
  
  match do |actual|
    actual.should be_an(HTTPI::Response)
    actual.code.should == response[:code]
    actual.headers.should == response[:headers]
    actual.body.should == response[:body]
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
httpi-0.9.2 spec/support/matchers.rb
httpi-0.9.1 spec/support/matchers.rb
httpi-0.9.0 spec/support/matchers.rb
httpi-0.8.0 spec/support/matchers.rb
httpi-0.7.9 spec/support/matchers.rb
httpi-0.7.8 spec/support/matchers.rb
httpi-0.7.7 spec/support/matchers.rb
httpi-0.7.6 spec/support/matchers.rb
httpi-0.7.5 spec/support/matchers.rb
httpi-0.7.4 spec/support/matchers.rb
httpi-0.7.3 spec/support/matchers.rb
httpi-0.7.2 spec/support/matchers.rb
httpi-0.7.1 spec/support/matchers.rb
httpi-0.7.0 spec/support/matchers.rb
httpi-0.6.1 spec/support/matchers.rb
httpi-0.6.0 spec/support/matchers.rb
httpi-0.5.0 spec/support/matchers.rb
httpi-0.4.1 spec/support/matchers.rb