bdewitt/httparrot — pull request #2 by lmcalpin (2012-02-16 16:56:04+00:00)
Title: simulate slow connections

this lets you use httparrot to test asynchronous http client code by simulating "long" processing/think time on a remote server. i had to change the api a bit, so you weren't always forced to pass in the env? flag. you might review that in case you don't like the change; i didn't actually see the flag being used anymore though.

# call_with_env replaces the env? flag you used to use
# delay in seconds
registration = @server.register(:get, "hi", resp.to_rack, :call_with_env => true, :delay => 2)

i also added a spec.