summaryrefslogtreecommitdiffstats
path: root/spec/helpers.js
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2014-02-09 15:11:12 -0600
committerkpdecker <kpdecker@gmail.com>2014-02-09 15:11:12 -0600
commit14b7ef9066d107dc83deedc8e6791947811cc764 (patch)
tree0ed872da5edb87edc052d34bc45af255864494ae /spec/helpers.js
parent9b14dc40a5ff5c3db0b62278dc0ea794c9a16593 (diff)
downloadhandlebars.js-14b7ef9066d107dc83deedc8e6791947811cc764.zip
handlebars.js-14b7ef9066d107dc83deedc8e6791947811cc764.tar.gz
handlebars.js-14b7ef9066d107dc83deedc8e6791947811cc764.tar.bz2
Make raw blocks operate like blocks
Diffstat (limited to 'spec/helpers.js')
-rw-r--r--spec/helpers.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/helpers.js b/spec/helpers.js
index b1d9722..ccde982 100644
--- a/spec/helpers.js
+++ b/spec/helpers.js
@@ -12,8 +12,8 @@ describe('helpers', function() {
it("helper for raw block gets raw content", function() {
var string = "{{{{raw}}}} {{test}} {{{{/raw}}}}";
var hash = { test: "hello" };
- var helpers = { raw: function(content) {
- return content;
+ var helpers = { raw: function(options) {
+ return options.fn();
} };
shouldCompileTo(string, [hash, helpers], " {{test}} ",
"raw block helper gets raw content");
@@ -22,8 +22,8 @@ describe('helpers', function() {
it("helper for raw block gets parameters", function() {
var string = "{{{{raw 1 2 3}}}} {{test}} {{{{/raw}}}}";
var hash = { test: "hello" };
- var helpers = { raw: function(content, a, b, c) {
- return content + a + b + c;
+ var helpers = { raw: function(a, b, c, options) {
+ return options.fn() + a + b + c;
} };
shouldCompileTo(string, [hash, helpers], " {{test}} 123",
"raw block helper gets raw content");