Created
September 16, 2010 08:00
-
-
Save anonymous/582118 to your computer and use it in GitHub Desktop.
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
test("empty block", function() { | |
// This test currently fails. Issue #7 | |
// the {{#goodbyes}}{{/goodbyes}} should ideally noop | |
var string = "{{#goodbyes}}{{/goodbyes}}cruel {{world}}!" | |
var hash = {goodbyes: [{text: "goodbye"}, {text: "Goodbye"}, {text: "GOODBYE"}], world: "world"}; | |
shouldCompileTo(string, hash, "cruel world!", | |
"Arrays iterate over the contents when not empty"); | |
shouldCompileTo(string, {goodbyes: [], world: "world"}, "cruel world!", | |
"Arrays ignore the contents when empty"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment