Skip to content

Commit

Permalink
added other http verbs
Browse files Browse the repository at this point in the history
  • Loading branch information
Pau Ramon committed Dec 29, 2010
1 parent 45468f3 commit d07f132
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions Readme.md
Expand Up @@ -8,13 +8,15 @@ Testosterone is built on nodejs but it allows you to test any http server.

`npm install testosterone`

## Options
## How does it work?

Testosterone accepts two options:
Call testosterone with two optional options:

- host _(localhost)_
- port _(80)_

Use the returned object to do http calls with a sinatra-like-chainable syntax.

If you want the virilest experiencie, replace nodejs assert with `testosterone.assert`

## Show me the code
Expand Down
3 changes: 2 additions & 1 deletion lib/testosterone.js
Expand Up @@ -172,7 +172,8 @@ module.exports = function (config) {
request.end();
};

['get', 'post'].forEach(function (method) {
['get', 'post', 'head', 'put', 'delete', 'trace', 'options', 'connect'].forEach(function (method) {
// refactor this a little bit
testosterone[method] = function (route, req, res, callback) {
count_responses += 1;
test();
Expand Down

0 comments on commit d07f132

Please sign in to comment.