summaryrefslogtreecommitdiffstats
path: root/spec/blocks.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/blocks.js')
-rw-r--r--spec/blocks.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/blocks.js b/spec/blocks.js
index 718d316..c57a67e 100644
--- a/spec/blocks.js
+++ b/spec/blocks.js
@@ -83,4 +83,15 @@ describe('blocks', function() {
"No people");
});
});
+
+ describe('standalone sections', function() {
+ it('block standalone else sections', function() {
+ shouldCompileTo('{{#people}}\n{{name}}\n{{^}}\n{{none}}\n{{/people}}\n', {none: 'No people'},
+ 'No people\n');
+ shouldCompileTo('{{#none}}\n{{.}}\n{{^}}\n{{none}}\n{{/none}}\n', {none: 'No people'},
+ 'No people\n');
+ shouldCompileTo('\n{{#people}}\n{{name}}\n{{^}}\n{{none}}\n{{/people}}\n', {none: 'No people'},
+ 'No people\n');
+ });
+ });
});