Add test for layout as string (#6445)

Merge pull request 6445
This commit is contained in:
Maximiliano Kotvinsky 2017-10-19 15:18:30 -03:00 committed by jekyllbot
parent c0478e290b
commit ae326148cc
1 changed files with 20 additions and 0 deletions

View File

@ -3,6 +3,26 @@ Feature: Layout data
I want to be able to embed data into my layouts
In order to make the layouts slightly dynamic
Scenario: Use custom layout data
Given I have a _layouts directory
And I have a "_layouts/999.html" file with content:
"""
---
---
{{ content }} layout content
"""
And I have an "index.html" page with layout "custom" that contains "page content"
And I have an "index.html" file with content:
"""
---
layout: 999
---
page content
"""
When I run jekyll build
Then the "_site/index.html" file should exist
And I should see "page content layout content" in "_site/index.html"
Scenario: Use custom layout data
Given I have a _layouts directory
And I have a "_layouts/custom.html" file with content: