Permalink
Browse files

[engines] added vows and tap to engines, bump to 0.1.1

  • Loading branch information...
1 parent cf830f2 commit 5e20e536876a8b8659113b0004a144f401e8393f @dscape committed Sep 9, 2011
Showing with 29 additions and 1 deletion.
  1. 0 engines/tap.js
  2. +19 −0 engines/vows.js
  3. +1 −1 package.json
  4. +9 −0 test/use.js
View
No changes.
View
@@ -0,0 +1,19 @@
+var _ = require('underscore')
+ , vows = require('vows')
+ , assert = require('assert')
+ , batch = {}
+ ;
+
+module.exports = exports = function(name,tests,module,selected) {
+ var f, ok, test_names;
+ if(selected) { test_names = selected.split(','); }
+ else { test_names =
+ _.filter(_.keys(tests), function(e) { return e.indexOf('_ok') === -1; });
+ }
+ _.foldl(test_names, function(memo,e) {
+ memo[e] = { topic: function () { tests[e](this.callback); }
+ , ok: tests[e + '_ok']
+ };
+ return memo; }, batch);
+ vows.describe('foo').addBatch(batch).exportTo(module);
+};
View
@@ -2,7 +2,7 @@
, "description": "node.js testing made easy"
, "homepage": "http://github.com/dscape/ensure"
, "repository": "git://github.com/dscape/ensure"
-, "version": "0.1.0"
+, "version": "0.1.1"
, "author": "Nuno Job <nunojobpinto@gmail.com> (http://nunojob.com)"
, "keywords": ["vows", "testing"]
, "dependencies":
View
@@ -0,0 +1,9 @@
+var ensure = require('../ensure').use('vows')
+ , assert = require('assert')
+ , tests = exports
+ ;
+
+tests.vows = function (cb) { cb(true); };
+tests.vows_ok = function (t) { assert.ok(t); };
+
+ensure((__filename + '_vows'),tests,module);

0 comments on commit 5e20e53

Please sign in to comment.