add test for group_by size property

This commit is contained in:
timwis 2016-02-25 10:41:23 -05:00
parent 7542ab51b7
commit 3fbca47b1a
1 changed files with 8 additions and 0 deletions

View File

@ -289,6 +289,14 @@ class TestFilters < JekyllUnitTest
end
end
end
should "include the size of each grouping" do
@filter.site.process
grouping = @filter.group_by(@filter.site.pages, "layout")
grouping.each do |g|
assert_equal g["items"].size, g["size"], "The size property for '#{g["name"]}' doesn't match the size of the Array."
end
end
end
context "where filter" do