Created
January 13, 2012 15:13
-
-
Save dhepper/1606892 to your computer and use it in GitHub Desktop.
A Vow with teardown
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
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