summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter van de Bruggen <pvande@gmail.com>2011-02-24 00:31:36 -0800
committerPieter van de Bruggen <pvande@gmail.com>2011-02-24 00:31:36 -0800
commitdeaedb83d5536a8438348b3d32819f93220cecff (patch)
tree4910c02c7533494f1b6ea8612dce4e7cb0c3d941
parenta9dd71d1f8dd7b7961b0890a9be3f3736923ceb9 (diff)
downloadmustache-spec-deaedb83d5536a8438348b3d32819f93220cecff.tar.gz
Improving readability.
-rw-r--r--specs/dot-notation.yml4
1 files changed, 4 insertions, 0 deletions
diff --git a/specs/dot-notation.yml b/specs/dot-notation.yml
index b712194..ba50055 100644
--- a/specs/dot-notation.yml
+++ b/specs/dot-notation.yml
@@ -4,18 +4,21 @@ tests:
data: { person: { name: 'Joe' } }
template: '"{{person.name}}" == "{{#person}}{{name}}{{/person}}"'
expected: '"Joe" == "Joe"'
+
- name: Arbitrary Depth
desc: Dot notation should be functional to any level of nesting.
data:
a: { b: { c: { d: { e: { name: 'Phil' } } } } }
template: '"{{a.b.c.d.e.name}}" == "Phil"'
expected: '"Phil" == "Phil"'
+
- name: Broken Chain
desc: Any falsey value prior to the last part of the name should yield ''.
data:
a: { }
template: '"{{a.b.c}}" == ""'
expected: '"" == ""'
+
- name: Broken Chain Resolution
desc: Each part of a dotted name should be resolved only against its elder.
data:
@@ -23,6 +26,7 @@ tests:
c: { name: 'Jim' }
template: '"{{a.b.c.name}}" == ""'
expected: '"" == ""'
+
- name: Initial Key Resolution
desc: The first part of a dotted name should resolve as any other name.
data: