Skip to content

Instantly share code, notes, and snippets.

@dhepper
Created January 13, 2012 15:13
Show Gist options
  • Save dhepper/1606892 to your computer and use it in GitHub Desktop.
Save dhepper/1606892 to your computer and use it in GitHub Desktop.
A Vow with teardown
vows = require('vows');
assert = require('assert');
vows.describe("A Vow with teardown").addBatch({
"A context": {
topic: function () {
return { flag: true };
},
"And a vow": function (topic) {
assert.isTrue(topic.flag);
},
teardown: function (topic) {
topic.flag = false;
},
}
}).export(module);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment