From 4c1b89e20ee444f5e7aa235972654d8a46fe2776 Mon Sep 17 00:00:00 2001 From: Justin Li Date: Wed, 8 Jul 2015 17:41:18 -0400 Subject: [PATCH] Add regression test for ranges on non-integer types --- test/integration/tags/for_tag_test.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/integration/tags/for_tag_test.rb b/test/integration/tags/for_tag_test.rb index 624a9de..fe2779f 100644 --- a/test/integration/tags/for_tag_test.rb +++ b/test/integration/tags/for_tag_test.rb @@ -38,6 +38,10 @@ HERE def test_for_with_range assert_template_result(' 1 2 3 ', '{%for item in (1..3) %} {{item}} {%endfor%}') + + assert_raises(Liquid::ArgumentError) do + Template.parse('{% for i in (a..2) %}{% endfor %}').render!("a" => [1, 2]) + end end def test_for_with_variable_range