Created
July 29, 2010 19:00
-
-
Save cararemixed/498935 to your computer and use it in GitHub Desktop.
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
var vows = require('vows'); | |
vows.describe('Deep Thought', { | |
topic: function () { | |
this.thought = new DeepThought; // prototypical scopes | |
}, | |
'thought is logical': [ | |
'define axioms' : { | |
topic: function () {...}, | |
'assert something': function () {...} | |
}, | |
'declare theory': { | |
topic: function () {...}, | |
'blah blah': function () {...} | |
}, | |
'test theory': { | |
after: function () {...}, | |
before: function () {...}, | |
step: function (step) {... step(); ...}, // inherited | |
topic: function () {...}, | |
'heheheh': function () {....} | |
} | |
] | |
}); | |
function certain_pattern(obj) { | |
return { | |
// easily create templates | |
step: special_logger | |
}; | |
function special_logger(step) { | |
... | |
step(); | |
} | |
} | |
# avoid addBatch API by nesting objects or using describe again | |
vows.describe('Shallow Thought', { | |
... | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment