From 3fbca47b1a1746bb671d6b5fe1b67941c4481b87 Mon Sep 17 00:00:00 2001 From: timwis Date: Thu, 25 Feb 2016 10:41:23 -0500 Subject: [PATCH] add test for group_by size property --- test/test_filters.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/test_filters.rb b/test/test_filters.rb index e9035b96..10812f5e 100644 --- a/test/test_filters.rb +++ b/test/test_filters.rb @@ -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