a4800c6e by Michael Richards

Update the Rivets.TextTemplateParser specs to pass in a set of delimiters. [#181]

1 parent fa71dc4c
...@@ -13,7 +13,7 @@ describe("Rivets.TextTemplateParser", function() { ...@@ -13,7 +13,7 @@ describe("Rivets.TextTemplateParser", function() {
13 {type: 0, value: " unread messages."} 13 {type: 0, value: " unread messages."}
14 ] 14 ]
15 15
16 results = Rivets.TextTemplateParser.parse(template) 16 results = Rivets.TextTemplateParser.parse(template, ['{{', '}}'])
17 expect(results.length).toBe(5) 17 expect(results.length).toBe(5)
18 18
19 for (i = 0; i < results.length; i++) { 19 for (i = 0; i < results.length; i++) {
...@@ -27,7 +27,7 @@ describe("Rivets.TextTemplateParser", function() { ...@@ -27,7 +27,7 @@ describe("Rivets.TextTemplateParser", function() {
27 template = "Hello World!" 27 template = "Hello World!"
28 expected = [{type: 0, value: "Hello World!"}] 28 expected = [{type: 0, value: "Hello World!"}]
29 29
30 results = Rivets.TextTemplateParser.parse(template) 30 results = Rivets.TextTemplateParser.parse(template, ['{{', '}}'])
31 expect(results.length).toBe(1) 31 expect(results.length).toBe(1)
32 32
33 for (i = 0; i < results.length; i++) { 33 for (i = 0; i < results.length; i++) {
...@@ -42,7 +42,7 @@ describe("Rivets.TextTemplateParser", function() { ...@@ -42,7 +42,7 @@ describe("Rivets.TextTemplateParser", function() {
42 template = "{{ user.name }}" 42 template = "{{ user.name }}"
43 expected = [{type: 1, value: "user.name"}] 43 expected = [{type: 1, value: "user.name"}]
44 44
45 results = Rivets.TextTemplateParser.parse(template) 45 results = Rivets.TextTemplateParser.parse(template, ['{{', '}}'])
46 expect(results.length).toBe(1) 46 expect(results.length).toBe(1)
47 47
48 for (i = 0; i < results.length; i++) { 48 for (i = 0; i < results.length; i++) {
......