diff options
author | Pieter van de Bruggen <pvande@gmail.com> | 2011-02-25 15:34:03 -0800 |
---|---|---|
committer | Pieter van de Bruggen <pvande@gmail.com> | 2011-02-25 15:34:03 -0800 |
commit | f778edad3a048d19dc75c777cfc22d20f238c0e9 (patch) | |
tree | 0ee2f9bd6168b21e1c2071be1335cad26a577295 /specs/inverted.yml | |
parent | f6cadccc777d8f9bda86826f3dd213723e64b0fc (diff) | |
download | mustache-spec-f778edad3a048d19dc75c777cfc22d20f238c0e9.tar.gz |
Specifying behavior for context 'misses'.
Context 'misses' should always interpolate as the empty string (by default), and should be considered falsey in Section tags.
Diffstat (limited to 'specs/inverted.yml')
-rw-r--r-- | specs/inverted.yml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/specs/inverted.yml b/specs/inverted.yml index 1e2c4fd..33b0a14 100644 --- a/specs/inverted.yml +++ b/specs/inverted.yml @@ -57,6 +57,12 @@ tests: template: "| A {{^bool}}B {{^bool}}C{{/bool}} D{{/bool}} E |" expected: "| A E |" + - name: Context Misses + desc: Failed context lookups should be considered falsey. + data: { } + template: "[{{^missing}}Cannot find key 'missing'!{{/missing}}]" + expected: "[Cannot find key 'missing'!]" + # Whitespace Sensitivity - name: Surrounding Whitespace |