No commit activity in last 3 years
No release in over 3 years
a very simple http server for use in automated integration tests
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme
HTTPStub
========

HTTPStub is a very simple HTTP server for use in automated integration tests. For example if you're relying on an ActiveResource in your Rails application and you want to use a live integration framework this will make it easier to run the tests in a continuous integration setup.

Example
-------

The following will stub out a success response for Person.create. (Note that you need to declare which ports to listen on beforehand):
HTTPStub.listen_on(3001)
HTTPStub.post "http://localhost:3001/people/", { :status => 201, :location => "http://localhost:3001/people/1.xml" }, <<-EOF
  <?xml version="1.0" encoding="UTF-8"?>
  <person>
    <id>1</id>
    <name>Joe Doe</name>
  </person>
EOF