diff options
Diffstat (limited to 'spec/runtime.js')
-rw-r--r-- | spec/runtime.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/runtime.js b/spec/runtime.js index 48a22a9..ce8b14c 100644 --- a/spec/runtime.js +++ b/spec/runtime.js @@ -48,6 +48,16 @@ describe('runtime', function() { template._child(1); }, Error, 'must pass parent depths'); }); + + it('should throw for block param methods without params', function() { + shouldThrow(function() { + var template = Handlebars.compile('{{#foo as |foo|}}{{foo}}{{/foo}}'); + // Calling twice to hit the non-compiled case. + template._setup({}); + template._setup({}); + template._child(1); + }, Error, 'must pass block params'); + }); it('should expose child template', function() { var template = Handlebars.compile('{{#foo}}bar{{/foo}}'); // Calling twice to hit the non-compiled case. @@ -57,7 +67,7 @@ describe('runtime', function() { it('should render depthed content', function() { var template = Handlebars.compile('{{#foo}}{{../bar}}{{/foo}}'); // Calling twice to hit the non-compiled case. - equal(template._child(1, undefined, [{bar: 'baz'}])(), 'baz'); + equal(template._child(1, undefined, [], [{bar: 'baz'}])(), 'baz'); }); }); |