diff --git a/test/writer_test.js b/test/writer_test.js index 8fcd6e1..f2253d5 100644 --- a/test/writer_test.js +++ b/test/writer_test.js @@ -16,6 +16,19 @@ vows.describe("Mustache.Writer").addBatch({ }); assert.equal(result, partial); + }, + "caches partials by content, not by name": function (writer) { + var result = writer.render("{{>partial}}", {}, { + partial: "partial one" + }); + + assert.equal(result, "partial one"); + + result = writer.render("{{>partial}}", {}, { + partial: "partial two" + }); + + assert.equal(result, "partial two"); } } }).export(module);