diff options
author | Pieter van de Bruggen <pvande@gmail.com> | 2011-02-09 20:39:13 -0800 |
---|---|---|
committer | Pieter van de Bruggen <pvande@gmail.com> | 2011-02-09 20:39:13 -0800 |
commit | fc53f5e7dccd0eeee9b9b7c9147b9773d5dc0889 (patch) | |
tree | a7558e46f0e7e00b6e0c1216aa85f7f169a3a3d2 | |
parent | 62871926ab5789ab6c55f5a1deda359ba5f7b2fa (diff) | |
download | mustache-spec-fc53f5e7dccd0eeee9b9b7c9147b9773d5dc0889.tar.gz |
The bare 't' in YAML is often coerced into 'true'.
-rw-r--r-- | specs/inverted.yml | 18 | ||||
-rw-r--r-- | specs/sections.yml | 18 |
2 files changed, 18 insertions, 18 deletions
diff --git a/specs/inverted.yml b/specs/inverted.yml index 29d1bac..1e2c4fd 100644 --- a/specs/inverted.yml +++ b/specs/inverted.yml @@ -31,15 +31,15 @@ tests: - name: Doubled desc: Multiple inverted sections per template should be permitted. - data: { t: false, two: 'second' } + data: { bool: false, two: 'second' } template: | - {{^t}} + {{^bool}} * first - {{/t}} + {{/bool}} * {{two}} - {{^t}} + {{^bool}} * third - {{/t}} + {{/bool}} expected: | * first * second @@ -47,14 +47,14 @@ tests: - name: Nested (Falsey) desc: Nested falsey sections should have their contents rendered. - data: { t: false } - template: "| A {{^t}}B {{^t}}C{{/t}} D{{/t}} E |" + data: { bool: false } + template: "| A {{^bool}}B {{^bool}}C{{/bool}} D{{/bool}} E |" expected: "| A B C D E |" - name: Nested (Truthy) desc: Nested truthy sections should be omitted. - data: { t: true } - template: "| A {{^t}}B {{^t}}C{{/t}} D{{/t}} E |" + data: { bool: true } + template: "| A {{^bool}}B {{^bool}}C{{/bool}} D{{/bool}} E |" expected: "| A E |" # Whitespace Sensitivity diff --git a/specs/sections.yml b/specs/sections.yml index dbfae8e..5d61227 100644 --- a/specs/sections.yml +++ b/specs/sections.yml @@ -70,15 +70,15 @@ tests: - name: Doubled desc: Multiple sections per template should be permitted. - data: { t: true, two: 'second' } + data: { bool: true, two: 'second' } template: | - {{#t}} + {{#bool}} * first - {{/t}} + {{/bool}} * {{two}} - {{#t}} + {{#bool}} * third - {{/t}} + {{/bool}} expected: | * first * second @@ -86,14 +86,14 @@ tests: - name: Nested (Truthy) desc: Nested truthy sections should have their contents rendered. - data: { t: true } - template: "| A {{#t}}B {{#t}}C{{/t}} D{{/t}} E |" + data: { bool: true } + template: "| A {{#bool}}B {{#bool}}C{{/bool}} D{{/bool}} E |" expected: "| A B C D E |" - name: Nested (Falsey) desc: Nested falsey sections should be omitted. - data: { t: false } - template: "| A {{#t}}B {{#t}}C{{/t}} D{{/t}} E |" + data: { bool: false } + template: "| A {{#bool}}B {{#bool}}C{{/bool}} D{{/bool}} E |" expected: "| A E |" # Whitespace Sensitivity |