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