diff --git a/features/collections.feature b/features/collections.feature index 87ae0b5e..5c75677f 100644 --- a/features/collections.feature +++ b/features/collections.feature @@ -105,3 +105,27 @@ Feature: Collections When I run jekyll build Then the _site directory should exist And I should see "Item count: 1" in "_site/index.html" + + Scenario: Sort by title + Given I have an "index.html" page that contains "{% assign items = site.methods | sort: 'title' %}1. of {{ items.size }}: {{ items.first.output }}" + And I have fixture collections + And I have a "_config.yml" file with content: + """ + collections: + - methods + """ + When I run jekyll build + Then the _site directory should exist + And I should see "1. of 5:
Page without title.
" in "_site/index.html" + + Scenario: Sort by relative_path + Given I have an "index.html" page that contains "Collections: {% assign methods = site.methods | sort: 'relative_path' %}{% for method in methods %}{{ method.title }}, {% endfor %}" + And I have fixture collections + And I have a "_config.yml" file with content: + """ + collections: + - methods + """ + When I run jekyll build + Then the _site directory should exist + And I should see "Collections: Jekyll.configuration, Jekyll.sanitized_path, Site#generate, , Site#generate," in "_site/index.html"