Fix .include? method on Enumerable drops, used by "contains" conditions

This commit is contained in:
Florian Weingarten
2013-08-02 10:23:10 -04:00
parent 7fdb789eac
commit f98949117d
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -220,6 +220,8 @@ class DropsTest < Test::Unit::TestCase
assert_equal "3", Liquid::Template.parse("{{collection[\"#{method}\"]}}").render('collection' => EnumerableDrop.new)
end
assert_equal "yes", Liquid::Template.parse("{% if collection contains 3 %}yes{% endif %}").render('collection' => RealEnumerableDrop.new)
[ :min, :first ].each do |method|
assert_equal "1", Liquid::Template.parse("{{collection.#{method}}}").render('collection' => RealEnumerableDrop.new)
assert_equal "1", Liquid::Template.parse("{{collection[\"#{method}\"]}}").render('collection' => RealEnumerableDrop.new)