Created
October 25, 2009 08:22
-
-
Save jcbozonier/217958 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
| when | |
| [ | |
| "I add two numbers" : [{ | |
| ItShould : "sum them", | |
| Means : function () { this.result.shouldEqual(this.num1 + this.num2);},{ | |
| ItShould : "sum them", | |
| Means : function () { this.result.shouldEqual(this.num1 + this.num2);}], | |
| "I make unf" :[{ | |
| ItShould : "unf them", | |
| Means : function () { this.result.shouldEqual(this.num1 + this.num2);},{ | |
| ItShould : "make unf to them", | |
| Means : function () { this.result.shouldEqual(this.num1 + this.num2);}] | |
| ] | |
| when("I Add two numbers") | |
| .itShould("sum them") | |
| .means(function () { this.result.shouldEqual(this.num1 + this.num2); }) | |
| .itShould("not subtract them") | |
| .means(function () { this.result.shouldNotBeSubtracted(); }); | |
| var they_are_summed = function () { this.result.shouldEqual(this.num1 + this.num2); } | |
| var they_are_not_subtracted = function () { this.result.shouldNotBeSubtracted(); } | |
| when("I Add two numbers") | |
| .itShould("sum them").means(they_are_summed) | |
| .itShould("not subtract them").means(they_are_not_subtracted); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment