Skip to content

Instantly share code, notes, and snippets.

@cararemixed
Created July 29, 2010 19:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cararemixed/498935 to your computer and use it in GitHub Desktop.
Save cararemixed/498935 to your computer and use it in GitHub Desktop.
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