Commit b0ce68b9 authored by Patrick de Kok's avatar Patrick de Kok

Added a test case for local group_by override

parent e56c9c20
......@@ -301,4 +301,68 @@ Feature: Grouping BibTeX Bibliographies
Then I should see "Januar" in "_site/scholar.html"
And I should not see "January" in "_site/scholar.html"
And I should see "Dezember" in "_site/scholar.html"
And I should not see "December" in "_site/scholar.html"
\ No newline at end of file
And I should not see "December" in "_site/scholar.html"
@tags @grouping
Scenario: Local grouping override - no grouping
Given I have a scholar configuration with:
| group_by | year
And I have a "_bibliography" directory
And I have a file "_bibliography/references.bib":
"""
@book{ruby1,
title = {The Ruby Programming Language},
author = {Flanagan, David and Matsumoto, Yukihiro},
year = {2008},
publisher = {O'Reilly Media}
}
@book{ruby2,
title = {The Ruby Programming Language},
author = {Flanagan, David and Matsumoto, Yukihiro},
year = {2007},
publisher = {O'Reilly Media}
}
"""
And I have a page "scholar.html":
"""
---
---
{% bibliography -f references --group_by none %}
"""
When I run jekyll
Then the _site directory should exist
And the "_site/scholar.html" file should exist
Then I should not see "<h2 class=\"bibliography\">2007</h2>" in "_site/scholar.html"
And I should not see "<h2 class=\"bibliography\">2008</h2>" in "_site/scholar.html"
@tags @grouping
Scenario: Local grouping override - grouping by year
Given I have a scholar configuration with:
| group_by | none
And I have a "_bibliography" directory
And I have a file "_bibliography/references.bib":
"""
@book{ruby1,
title = {The Ruby Programming Language},
author = {Flanagan, David and Matsumoto, Yukihiro},
year = {2008},
publisher = {O'Reilly Media}
}
@book{ruby2,
title = {The Ruby Programming Language},
author = {Flanagan, David and Matsumoto, Yukihiro},
year = {2007},
publisher = {O'Reilly Media}
}
"""
And I have a page "scholar.html":
"""
---
---
{% bibliography -f references --group_by none %}
"""
When I run jekyll
Then the _site directory should exist
And the "_site/scholar.html" file should exist
Then I should see "<h2 class=\"bibliography\">2007</h2>" in "_site/scholar.html"
And I should see "<h2 class=\"bibliography\">2008</h2>" in "_site/scholar.html"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment