filters#sample: n == 1, return item; n > 1, return array

This commit is contained in:
Parker Moore
2015-12-04 10:25:13 -08:00
parent 0aa3c96d11
commit 2e91d094e5
2 changed files with 7 additions and 2 deletions

View File

@@ -397,7 +397,7 @@ class TestFilters < JekyllUnitTest
should "allow sampling of multiple values (n > 1)" do
input = %w(hey there bernie)
@filter.sample(input, 2).each do |val|
assert_includes val, input
assert_includes input, val
end
end
end