Skip to content
Browse files

added optional host. improved docs

  • Loading branch information...
1 parent ce8b52e commit 8890fa932ee0dff6aba49b7039cb4477f239a078 Pau Ramon committed Dec 29, 2010
Showing with 19 additions and 7 deletions.
  1. +14 −4 Readme.md
  2. +1 −2 example/test.js
  3. +4 −1 lib/testosterone.js
View
18 Readme.md
@@ -2,20 +2,30 @@
Synchronous testing for virile http servers.
+## Installation
+
+`npm install testosterone`
+
## How does it work?
+Testosterone is built on nodejs but it allows you to test any http server.
+
The core of this library is a shameless copy from [expresso](https://github.com/visionmedia/expresso.git) response assert.
-## Installation
+## Options
-`npm install testosterone`
+Testosterone accepts two options:
+
+ - host _(localhost)_
+ - port _(80)_
+
+If you want the virilest experiencie, replace nodejs assert with `testosterone.assert`
## Show me the code
Example:
- var app = require('./app'),
- testosterone = require('../lib/testosterone')(),
+ var testosterone = require('../lib/testosterone')({post: 3000}),
assert = testosterone.assert;
testosterone
View
3 example/test.js
@@ -1,5 +1,4 @@
-var app = require('./app'),
- testosterone = require('testosterone')(),
+var testosterone = require('testosterone')({port: 3000}),
assert = testosterone.assert;
testosterone
View
5 lib/testosterone.js
@@ -2,7 +2,10 @@ module.exports = function (config) {
config = config || {};
// extend assert
- var client = require('http').createClient(config.port || 3000),
+ var client = require('http').createClient(
+ config.port || 80,
+ config.host || 'localhost'
+ ),
sys = require('sys'),
testosterone = {},

0 comments on commit 8890fa9

Please sign in to comment.
Something went wrong with that request. Please try again.