summaryrefslogtreecommitdiff
path: root/specs/implicit_iterator.yml
diff options
context:
space:
mode:
Diffstat (limited to 'specs/implicit_iterator.yml')
-rw-r--r--specs/implicit_iterator.yml19
1 files changed, 19 insertions, 0 deletions
diff --git a/specs/implicit_iterator.yml b/specs/implicit_iterator.yml
new file mode 100644
index 0000000..eafd175
--- /dev/null
+++ b/specs/implicit_iterator.yml
@@ -0,0 +1,19 @@
+tests:
+ - name: Strings
+ desc: Strings should be directly interpolated.
+ data:
+ list: [ 'a', 'b', 'c', 'd', 'e' ]
+ template: '"{{#list}}({{.}}){{/list}}"'
+ expected: '"(a)(b)(c)(d)(e)"'
+ - name: Integers
+ desc: Integers should be coerced into strings and interpolated.
+ data:
+ list: [ 1, 2, 3, 4, 5 ]
+ template: '"{{#list}}({{.}}){{/list}}"'
+ expected: '"(1)(2)(3)(4)(5)"'
+ - name: Non-Integers
+ desc: Non-integers should be coerced into strings and interpolated.
+ data:
+ list: [ 1.1, 2.2, 3.3, 4.4, 5.5 ]
+ template: '"{{#list}}({{.}}){{/list}}"'
+ expected: '"(1.1)(2.2)(3.3)(4.4)(5.5)"'