Skip to content

Instantly share code, notes, and snippets.

@jmreidy
Forked from cronopio/gist:1307973
Created October 24, 2011 18:59
Show Gist options
  • Save jmreidy/1309827 to your computer and use it in GitHub Desktop.
Save jmreidy/1309827 to your computer and use it in GitHub Desktop.
Testing vows-bdd
/**
* Pruebas para la creacion de un usuario en el sitio
*/
var Feature = require('vows-bdd').Feature,
http = require('http'),
assert = require('assert');
Feature('Creando un usuario', module)
.scenario('creando un usuario usando el registro')
.given('El servidor esta corriendo', function(){
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(3000, "127.0.0.1", this.callback);
})
.when('Visito el index', function() {
this.callback();
})
.then('run a test', function() {
assert.ok(true);
})
.complete(function(){console.log('terminando')})
.finish(module);
@cronopio
Copy link

oh yeah. Work so great!!

@cronopio
Copy link

Thanks a lot!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment