Ruby webmock

From wikinotes

An HTTP request mocking library.

Documentation

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

Example

stub_request(:any, "www.example.com")                           # get, patch, post, ...
stub_request(:get, /foo./)                                      # regex match request
stub_request(:get, lambda { |request| request.body == "abc" })  #