summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter van de Bruggen <pvande@gmail.com>2010-11-18 19:58:46 -0800
committerPieter van de Bruggen <pvande@gmail.com>2010-11-18 19:58:46 -0800
commit5058a4394a10b750d31dad432e8b27c37c86b3fb (patch)
treeea75e8617c575f500cd2f17cdf87b33dc806d5bb
parenta61dea038ce38382dced750d9e3ba9ce588a776f (diff)
downloadmustache-spec-5058a4394a10b750d31dad432e8b27c37c86b3fb.tar.gz
Avoid testing too many cases against string bounds.
-rw-r--r--specs/sections.yml20
1 files changed, 10 insertions, 10 deletions
diff --git a/specs/sections.yml b/specs/sections.yml
index f034e77..df015bb 100644
--- a/specs/sections.yml
+++ b/specs/sections.yml
@@ -2,32 +2,32 @@ tests:
- name: Truthy
desc: Truthy sections should have their contents rendered.
data: { boolean: true }
- template: '{{#boolean}}This should be rendered.{{/boolean}}'
- expected: 'This should be rendered.'
+ template: '"{{#boolean}}This should be rendered.{{/boolean}}"'
+ expected: '"This should be rendered."'
- name: Falsey
desc: Falsey sections should have their contents omitted.
data: { boolean: false }
- template: '{{#boolean}}This should not be rendered.{{/boolean}}'
- expected: ''
+ template: '"{{#boolean}}This should not be rendered.{{/boolean}}"'
+ expected: '""'
- name: Context
desc: Objects and hashes should be pushed onto the context stack.
data: { context: { name: 'Joe' } }
- template: '{{#context}}Hi {{name}}.{{/context}}'
- expected: 'Hi Joe.'
+ template: '"{{#context}}Hi {{name}}.{{/context}}"'
+ expected: '"Hi Joe."'
- name: List
desc: Lists should be iterated; list items should visit the context stack.
data: { list: [ { n: 1 }, { n: 2 }, { n: 3 } ] }
- template: '{{#list}}{{n}}{{/list}}'
- expected: '123'
+ template: '"{{#list}}{{n}}{{/list}}"'
+ expected: '"123"'
- name: Empty List
desc: Empty lists should behave like falsey values.
data: { list: [ ] }
- template: '{{#list}}Yay lists!{{/list}}'
- expected: ''
+ template: '"{{#list}}Yay lists!{{/list}}"'
+ expected: '""'
- name: Doubled
desc: Multiple sections per template should be permitted.