postrank-labs/goliath — pull request #184 by xentek (2012-05-24 06:33:14+00:00)
Title: Options Requests in Tests

Adds the ability to make test requests using the OPTIONS HTTP method. Goliath already allows you to respond to this method, but you couldn't verify that in your specs.

This patch depends on igrigorik/em-http-request#193 being pulled, since that is the http client being used by the test_helper. Once that's in place you'll be able to test that your endpoints properly respond to OPTIONS requests, which are used by JavaScript clients as a pre-flight check on the ALLOWED_METHODS header when making non-idempodent requests such as PUT and DELETE (not-including POST).