add failing test for scope values in subdirs

ref #4458
This commit is contained in:
Florian Thomas 2016-02-16 22:26:40 +01:00 committed by Parker Moore
parent 8257f0abd9
commit 46dd5cf5a2
No known key found for this signature in database
GPG Key ID: 193CDEBA72063C58
1 changed files with 20 additions and 0 deletions

View File

@ -80,6 +80,26 @@ Feature: frontmatter defaults
And I should see "main: <p>content of site/special/2013/10/14/about1.html</p>" in "_site/special/2013/10/14/about1.html" And I should see "main: <p>content of site/special/2013/10/14/about1.html</p>" in "_site/special/2013/10/14/about1.html"
And I should see "main: <p>content of site/special/2013/10/14/about2.html</p>" in "_site/special/2013/10/14/about2.html" And I should see "main: <p>content of site/special/2013/10/14/about2.html</p>" in "_site/special/2013/10/14/about2.html"
Scenario: Use frontmatter scopes for subdirectories
Given I have a _layouts directory
And I have a main layout that contains "main: {{ content }}"
And I have a _posts/en directory
And I have the following post under "en":
| title | date | content |
| helloworld | 2014-09-01 | {{page.lang}} is the current language |
And I have a _posts/de directory
And I have the following post under "de":
| title | date | content |
| hallowelt | 2014-09-01 | {{page.lang}} is the current language |
And I have a configuration file with "defaults" set to "[{scope: {path: "_posts/en"}, values: {layout: "main", lang: "en"}}, {scope: {path: "_posts/de"}, values: {layout: "main", lang: "de"}}]"
When I run jekyll build
Then the _site directory should exist
And I should see "main: <p>en is the current language</p>" in "_site/2014/09/01/helloworld.html"
And I should see "main: <p>de is the current language</p>" in "_site/2014/09/01/hallowelt.html"
Scenario: Override frontmatter defaults by type Scenario: Override frontmatter defaults by type
Given I have a _posts directory Given I have a _posts directory
And I have the following post: And I have the following post: