Skip to content

Instantly share code, notes, and snippets.

@cronopio
Created October 23, 2011 22:27
Show Gist options
  • Save cronopio/1307973 to your computer and use it in GitHub Desktop.
Save cronopio/1307973 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(){
var self = this;
http.request({
host:"localhost",
port:3000
}, function(res) {
console.log('Respuesta', res);
});
self.callback();
})
.when('Visito el index', function() {
this.callback();
})
.then('Veo el title', function() {
assert.ok(true);
})
.complete(function(){console.log('terminando')})
.finish(module);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment