Created
October 23, 2011 22:27
-
-
Save cronopio/1307973 to your computer and use it in GitHub Desktop.
Testing vows-bdd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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