From 80910293293c606de620f6f5092b9a649d475b80 Mon Sep 17 00:00:00 2001 From: "maul.esel" Date: Mon, 14 Oct 2013 16:48:26 +0200 Subject: [PATCH] move cucumber features to own file --- features/frontmatter_defaults.feature | 22 ++++++++++++++++++++++ features/post_data.feature | 22 ---------------------- 2 files changed, 22 insertions(+), 22 deletions(-) create mode 100644 features/frontmatter_defaults.feature diff --git a/features/frontmatter_defaults.feature b/features/frontmatter_defaults.feature new file mode 100644 index 00000000..36509876 --- /dev/null +++ b/features/frontmatter_defaults.feature @@ -0,0 +1,22 @@ +Feature: frontmatter defaults + Scenario: Use default for frontmatter variables internally + Given I have a _posts directory + And I have a _layouts directory + And I have a configuration file with "defaults" set to "[{scope: {path: "", type: "post"}, values: {layout: "pretty"}}]" + And I have a pretty layout that contains "THIS IS THE LAYOUT: {{content}}" + And I have the following post: + | title | date | content | + | default layout | 2013-09-11 | Just some post | + When I run jekyll + Then the _site directory should exist + And I should see "THIS IS THE LAYOUT:

Just some post

" in "_site/2013/09/11/default-layout.html" + + Scenario: Use default for frontmatter variables in Liquid + Given I have a _posts directory + And I have a configuration file with "defaults" set to "[{scope: {path: "", type: "post"}, values: {custom: "some special data", author: "Ben"}}]" + And I have the following post: + | title | date | author | content | + | default data | 2013-09-11 | Marc |

{{page.custom}}

{{page.author}}
| + When I run jekyll + Then the _site directory should exist + And I should see "

some special data

Marc
" in "_site/2013/09/11/default-data.html" diff --git a/features/post_data.feature b/features/post_data.feature index 61714b0a..34f58187 100644 --- a/features/post_data.feature +++ b/features/post_data.feature @@ -212,25 +212,3 @@ Feature: Post data Then the _site directory should exist And I should see "next post: Some like it hot" in "_site/2009/03/27/star-wars.html" And I should see "Previous post: Some like it hot" in "_site/2009/05/27/terminator.html" - - Scenario: Use default for frontmatter variables internally - Given I have a _posts directory - And I have a _layouts directory - And I have a configuration file with "defaults" set to "[{scope: {path: "", type: "post"}, values: {layout: "pretty"}}]" - And I have a pretty layout that contains "THIS IS THE LAYOUT: {{content}}" - And I have the following post: - | title | date | content | - | default layout | 2013-09-11 | Just some post | - When I run jekyll - Then the _site directory should exist - And I should see "THIS IS THE LAYOUT:

Just some post

" in "_site/2013/09/11/default-layout.html" - - Scenario: Use default for frontmatter variables in Liquid - Given I have a _posts directory - And I have a configuration file with "defaults" set to "[{scope: {path: "", type: "post"}, values: {custom: "some special data", author: "Ben"}}]" - And I have the following post: - | title | date | author | content | - | default data | 2013-09-11 | Marc |

{{page.custom}}

{{page.author}}
| - When I run jekyll - Then the _site directory should exist - And I should see "

some special data

Marc
" in "_site/2013/09/11/default-data.html"