Questions tagged [webmock]

Library for stubbing and setting expectations on HTTP requests in Ruby.

Library for stubbing and setting expectations on HTTP requests in Ruby.

Features

  • Stubbing HTTP requests at low http client lib level (no need to change tests when you change HTTP library)
  • Setting and verifying expectations on HTTP requests
  • Matching requests based on method, URI, headers and body
  • Smart matching of the same URIs in different representations (also encoded and non encoded forms)
  • Smart matching of the same headers in different representations.
  • Support for Test::Unit
  • Support for RSpec 1.x and RSpec 2.x
  • Support for MiniTest

Supported HTTP libraries

  • Net::HTTP and libraries based on Net::HTTP (i.e RightHttpConnection, REST Client, HTTParty)
  • HTTPClient
  • Patron
  • EM-HTTP-Request
  • Curb (currently only Curb::Easy)
  • Typhoeus (currently only Typhoeus::Hydra)
  • Excon

Supported Ruby Interpreters

  • MRI 1.8.6
  • MRI 1.8.7
  • MRI 1.9.1
  • MRI 1.9.2
  • MRI 1.9.3
  • REE 1.8.7
  • JRuby
  • Rubinius

Source: https://github.com/bblimke/webmock

166 questions
-2
votes
1 answer

RSpec and WebMock: ignore request

When I run the test then I get this an error: /gems/ruby-2.3.1@app2/gems/webmock-2.1.0/lib/webmock/http_lib_adapters/typhoeus_hydra_adapter.rb:166:in `block in ': Real HTTP connections are disabled. Unregistered request: HEAD…
user6423806
1 2 3
11
12