Created
March 11, 2009 10:11
-
-
Save mcdave/77399 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
SugarTest() | |
.describe('A context') | |
.before(function() { | |
this.something = 1; | |
}) | |
.it('runs its setup function', function() { | |
this.assertEqual(1, this.something); | |
}) | |
.describe('which is an inner context') | |
.before(function() { | |
this.something += 1; | |
}) | |
.it('runs both setup functions', function() { | |
this.assertEqual(2, this.something); | |
}) | |
.end() | |
.end() | |
.run(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment