features: validate the exit status of 0 for successful calls

This commit is contained in:
Parker Moore 2016-01-18 11:52:31 -08:00
parent 9a6f4e08b7
commit 736a800f0e
16 changed files with 286 additions and 143 deletions

View File

@ -8,7 +8,8 @@ Feature: Collections
And I have fixture collections And I have fixture collections
And I have a configuration file with "collections" set to "['methods']" And I have a configuration file with "collections" set to "['methods']"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Collections: <p>Use <code class=\"highlighter-rouge\">Jekyll.configuration</code> to build a full configuration for use w/Jekyll.</p>\n\n<p>Whatever: foo.bar</p>\n<p>Signs are nice</p>\n<p><code class=\"highlighter-rouge\">Jekyll.sanitized_path</code> is used to make sure your path is in your source.</p>\n<p>Run your generators! default</p>\n<p>Page without title.</p>\n<p>Run your generators! default</p>" in "_site/index.html" And I should see "Collections: <p>Use <code class=\"highlighter-rouge\">Jekyll.configuration</code> to build a full configuration for use w/Jekyll.</p>\n\n<p>Whatever: foo.bar</p>\n<p>Signs are nice</p>\n<p><code class=\"highlighter-rouge\">Jekyll.sanitized_path</code> is used to make sure your path is in your source.</p>\n<p>Run your generators! default</p>\n<p>Page without title.</p>\n<p>Run your generators! default</p>" in "_site/index.html"
And the "_site/methods/configuration.html" file should not exist And the "_site/methods/configuration.html" file should not exist
@ -24,7 +25,8 @@ Feature: Collections
foo: bar foo: bar
""" """
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Collections: output => true" in "_site/index.html" And I should see "Collections: output => true" in "_site/index.html"
And I should see "label => methods" in "_site/index.html" And I should see "label => methods" in "_site/index.html"
And I should see "Methods metadata: bar" in "_site/collection_metadata.html" And I should see "Methods metadata: bar" in "_site/collection_metadata.html"
@ -41,7 +43,8 @@ Feature: Collections
permalink: /:collection/:path/ permalink: /:collection/:path/
""" """
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "<p>Whatever: foo.bar</p>" in "_site/methods/configuration/index.html" And I should see "<p>Whatever: foo.bar</p>" in "_site/methods/configuration/index.html"
Scenario: Rendered document in a layout Scenario: Rendered document in a layout
@ -56,7 +59,8 @@ Feature: Collections
foo: bar foo: bar
""" """
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Collections: output => true" in "_site/index.html" And I should see "Collections: output => true" in "_site/index.html"
And I should see "label => methods" in "_site/index.html" And I should see "label => methods" in "_site/index.html"
And I should see "foo => bar" in "_site/index.html" And I should see "foo => bar" in "_site/index.html"
@ -72,7 +76,8 @@ Feature: Collections
- methods - methods
""" """
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Collections: _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/um_hi.md" in "_site/index.html" And I should see "Collections: _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/um_hi.md" in "_site/index.html"
Scenario: Collections specified as an hash Scenario: Collections specified as an hash
@ -84,7 +89,8 @@ Feature: Collections
- methods - methods
""" """
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Collections: _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/um_hi.md" in "_site/index.html" And I should see "Collections: _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/um_hi.md" in "_site/index.html"
Scenario: All the documents Scenario: All the documents
@ -96,7 +102,8 @@ Feature: Collections
- methods - methods
""" """
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "All documents: _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/um_hi.md" in "_site/index.html" And I should see "All documents: _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/um_hi.md" in "_site/index.html"
Scenario: Documents have an output attribute, which is the converted HTML Scenario: Documents have an output attribute, which is the converted HTML
@ -108,7 +115,8 @@ Feature: Collections
- methods - methods
""" """
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "First document's output: <p>Use <code class=\"highlighter-rouge\">Jekyll.configuration</code> to build a full configuration for use w/Jekyll.</p>\n\n<p>Whatever: foo.bar</p>" in "_site/index.html" And I should see "First document's output: <p>Use <code class=\"highlighter-rouge\">Jekyll.configuration</code> to build a full configuration for use w/Jekyll.</p>\n\n<p>Whatever: foo.bar</p>" in "_site/index.html"
Scenario: Filter documents by where Scenario: Filter documents by where
@ -120,7 +128,8 @@ Feature: Collections
- methods - methods
""" """
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Item count: 2" in "_site/index.html" And I should see "Item count: 2" in "_site/index.html"
Scenario: Sort by title Scenario: Sort by title
@ -132,7 +141,8 @@ Feature: Collections
- methods - methods
""" """
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "1. of 7: <p>Page without title.</p>" in "_site/index.html" And I should see "1. of 7: <p>Page without title.</p>" in "_site/index.html"
Scenario: Sort by relative_path Scenario: Sort by relative_path
@ -144,5 +154,6 @@ Feature: Collections
- methods - methods
""" """
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Collections: Jekyll.configuration, Jekyll.escape, Jekyll.sanitized_path, Site#generate, , Site#generate," in "_site/index.html" And I should see "Collections: Jekyll.configuration, Jekyll.escape, Jekyll.sanitized_path, Site#generate, , Site#generate," in "_site/index.html"

View File

@ -13,7 +13,8 @@ Feature: Create sites
Scenario: Basic site Scenario: Basic site
Given I have an "index.html" file that contains "Basic Site" Given I have an "index.html" file that contains "Basic Site"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Basic Site" in "_site/index.html" And I should see "Basic Site" in "_site/index.html"
Scenario: Basic site with a post Scenario: Basic site with a post
@ -22,7 +23,8 @@ Feature: Create sites
| title | date | content | | title | date | content |
| Hackers | 2009-03-27 | My First Exploit | | Hackers | 2009-03-27 | My First Exploit |
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "My First Exploit" in "_site/2009/03/27/hackers.html" And I should see "My First Exploit" in "_site/2009/03/27/hackers.html"
Scenario: Basic site with layout and a page Scenario: Basic site with layout and a page
@ -30,7 +32,8 @@ Feature: Create sites
And I have an "index.html" page with layout "default" that contains "Basic Site with Layout" And I have an "index.html" page with layout "default" that contains "Basic Site with Layout"
And I have a default layout that contains "Page Layout: {{ content }}" And I have a default layout that contains "Page Layout: {{ content }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Page Layout: Basic Site with Layout" in "_site/index.html" And I should see "Page Layout: Basic Site with Layout" in "_site/index.html"
Scenario: Basic site with layout and a post Scenario: Basic site with layout and a post
@ -41,7 +44,8 @@ Feature: Create sites
| Wargames | 2009-03-27 | default | The only winning move is not to play. | | Wargames | 2009-03-27 | default | The only winning move is not to play. |
And I have a default layout that contains "Post Layout: {{ content }}" And I have a default layout that contains "Post Layout: {{ content }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Post Layout: <p>The only winning move is not to play.</p>" in "_site/2009/03/27/wargames.html" And I should see "Post Layout: <p>The only winning move is not to play.</p>" in "_site/2009/03/27/wargames.html"
Scenario: Basic site with layout inside a subfolder and a post Scenario: Basic site with layout inside a subfolder and a post
@ -52,7 +56,8 @@ Feature: Create sites
| Wargames | 2009-03-27 | post/simple | The only winning move is not to play. | | Wargames | 2009-03-27 | post/simple | The only winning move is not to play. |
And I have a post/simple layout that contains "Post Layout: {{ content }}" And I have a post/simple layout that contains "Post Layout: {{ content }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Post Layout: <p>The only winning move is not to play.</p>" in "_site/2009/03/27/wargames.html" And I should see "Post Layout: <p>The only winning move is not to play.</p>" in "_site/2009/03/27/wargames.html"
Scenario: Basic site with layouts, pages, posts and files Scenario: Basic site with layouts, pages, posts and files
@ -75,7 +80,8 @@ Feature: Create sites
| entry3 | 2009-05-27 | post | content for entry3. | | entry3 | 2009-05-27 | post | content for entry3. |
| entry4 | 2009-06-27 | post | content for entry4. | | entry4 | 2009-06-27 | post | content for entry4. |
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Page : Site contains 2 pages and 4 posts" in "_site/index.html" And I should see "Page : Site contains 2 pages and 4 posts" in "_site/index.html"
And I should see "No replacement \{\{ site.posts.size \}\}" in "_site/about.html" And I should see "No replacement \{\{ site.posts.size \}\}" in "_site/about.html"
And I should see "" in "_site/another_file" And I should see "" in "_site/another_file"
@ -90,7 +96,8 @@ Feature: Create sites
And I have an "index.html" page that contains "Basic Site with include tag: {% include about.textile %}" And I have an "index.html" page that contains "Basic Site with include tag: {% include about.textile %}"
And I have an "_includes/about.textile" file that contains "Generated by Jekyll" And I have an "_includes/about.textile" file that contains "Generated by Jekyll"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Basic Site with include tag: Generated by Jekyll" in "_site/index.html" And I should see "Basic Site with include tag: Generated by Jekyll" in "_site/index.html"
Scenario: Basic site with subdir include tag Scenario: Basic site with subdir include tag
@ -99,7 +106,8 @@ Feature: Create sites
And I have an info directory And I have an info directory
And I have an "info/index.html" page that contains "Basic Site with subdir include tag: {% include about.textile %}" And I have an "info/index.html" page that contains "Basic Site with subdir include tag: {% include about.textile %}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Basic Site with subdir include tag: Generated by Jekyll" in "_site/info/index.html" And I should see "Basic Site with subdir include tag: Generated by Jekyll" in "_site/info/index.html"
Scenario: Basic site with nested include tag Scenario: Basic site with nested include tag
@ -108,7 +116,8 @@ Feature: Create sites
And I have an "_includes/jekyll.textile" file that contains "Jekyll" And I have an "_includes/jekyll.textile" file that contains "Jekyll"
And I have an "index.html" page that contains "Basic Site with include tag: {% include about.textile %}" And I have an "index.html" page that contains "Basic Site with include tag: {% include about.textile %}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Basic Site with include tag: Generated by Jekyll" in "_site/index.html" And I should see "Basic Site with include tag: Generated by Jekyll" in "_site/index.html"
Scenario: Basic site with internal post linking Scenario: Basic site with internal post linking
@ -120,19 +129,22 @@ Feature: Create sites
| entry1 | 2007-12-31 | post | content for entry1. | | entry1 | 2007-12-31 | post | content for entry1. |
| entry2 | 2008-01-01 | post | content for entry2. | | entry2 | 2008-01-01 | post | content for entry2. |
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "URL: /2008/01/01/entry2/" in "_site/index.html" And I should see "URL: /2008/01/01/entry2/" in "_site/index.html"
Scenario: Basic site with whitelisted dotfile Scenario: Basic site with whitelisted dotfile
Given I have an ".htaccess" file that contains "SomeDirective" Given I have an ".htaccess" file that contains "SomeDirective"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "SomeDirective" in "_site/.htaccess" And I should see "SomeDirective" in "_site/.htaccess"
Scenario: File was replaced by a directory Scenario: File was replaced by a directory
Given I have a "test" file that contains "some stuff" Given I have a "test" file that contains "some stuff"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
When I delete the file "test" When I delete the file "test"
Given I have a test directory Given I have a test directory
And I have a "test/index.html" file that contains "some other stuff" And I have a "test/index.html" file that contains "some other stuff"
@ -146,13 +158,15 @@ Feature: Create sites
And I have a "secret.html" page with published "false" that contains "Unpublished page" And I have a "secret.html" page with published "false" that contains "Unpublished page"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And the "_site/index.html" file should exist And the "_site/index.html" file should exist
And the "_site/public.html" file should exist And the "_site/public.html" file should exist
But the "_site/secret.html" file should not exist But the "_site/secret.html" file should not exist
When I run jekyll build --unpublished When I run jekyll build --unpublished
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And the "_site/index.html" file should exist And the "_site/index.html" file should exist
And the "_site/public.html" file should exist And the "_site/public.html" file should exist
And the "_site/secret.html" file should exist And the "_site/secret.html" file should exist
@ -164,9 +178,11 @@ Feature: Create sites
| entry1 | 2020-12-31 | post | content for entry1. | | entry1 | 2020-12-31 | post | content for entry1. |
| entry2 | 2007-12-31 | post | content for entry2. | | entry2 | 2007-12-31 | post | content for entry2. |
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "content for entry2" in "_site/2007/12/31/entry2.html" And I should see "content for entry2" in "_site/2007/12/31/entry2.html"
And the "_site/2020/12/31/entry1.html" file should not exist And the "_site/2020/12/31/entry1.html" file should not exist
When I run jekyll build --future When I run jekyll build --future
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And the "_site/2020/12/31/entry1.html" file should exist And the "_site/2020/12/31/entry1.html" file should exist

View File

@ -10,7 +10,8 @@ Feature: Draft Posts
| title | date | layout | content | | title | date | layout | content |
| Recipe | 2009-03-27 | default | Not baked yet. | | Recipe | 2009-03-27 | default | Not baked yet. |
When I run jekyll build --drafts When I run jekyll build --drafts
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Not baked yet." in "_site/recipe.html" And I should see "Not baked yet." in "_site/recipe.html"
Scenario: Don't preview a draft Scenario: Don't preview a draft
@ -21,7 +22,8 @@ Feature: Draft Posts
| title | date | layout | content | | title | date | layout | content |
| Recipe | 2009-03-27 | default | Not baked yet. | | Recipe | 2009-03-27 | default | Not baked yet. |
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And the "_site/recipe.html" file should not exist And the "_site/recipe.html" file should not exist
Scenario: Don't preview a draft that is not published Scenario: Don't preview a draft that is not published
@ -32,7 +34,8 @@ Feature: Draft Posts
| title | date | layout | published | content | | title | date | layout | published | content |
| Recipe | 2009-03-27 | default | false | Not baked yet. | | Recipe | 2009-03-27 | default | false | Not baked yet. |
When I run jekyll build --drafts When I run jekyll build --drafts
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And the "_site/recipe.html" file should not exist And the "_site/recipe.html" file should not exist
Scenario: Use page.path variable Scenario: Use page.path variable
@ -42,5 +45,6 @@ Feature: Draft Posts
| title | date | layout | content | | title | date | layout | content |
| Recipe | 2009-03-27 | simple | Post path: {{ page.path }} | | Recipe | 2009-03-27 | simple | Post path: {{ page.path }} |
When I run jekyll build --drafts When I run jekyll build --drafts
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Post path: _drafts/recipe.markdown" in "_site/recipe.html" And I should see "Post path: _drafts/recipe.markdown" in "_site/recipe.html"

View File

@ -11,7 +11,8 @@ Feature: Embed filters
| Star Wars | 2009-03-27 | default | These aren't the droids you're looking for. | | Star Wars | 2009-03-27 | default | These aren't the droids you're looking for. |
And I have a default layout that contains "{{ site.time | date_to_xmlschema }}" And I have a default layout that contains "{{ site.time | date_to_xmlschema }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see today's date in "_site/2009/03/27/star-wars.html" And I should see today's date in "_site/2009/03/27/star-wars.html"
Scenario: Escape text for XML Scenario: Escape text for XML
@ -22,7 +23,8 @@ Feature: Embed filters
| Star & Wars | 2009-03-27 | default | These aren't the droids you're looking for. | | Star & Wars | 2009-03-27 | default | These aren't the droids you're looking for. |
And I have a default layout that contains "{{ page.title | xml_escape }}" And I have a default layout that contains "{{ page.title | xml_escape }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Star &amp; Wars" in "_site/2009/03/27/star-wars.html" And I should see "Star &amp; Wars" in "_site/2009/03/27/star-wars.html"
Scenario: Calculate number of words Scenario: Calculate number of words
@ -33,7 +35,8 @@ Feature: Embed filters
| Star Wars | 2009-03-27 | default | These aren't the droids you're looking for. | | Star Wars | 2009-03-27 | default | These aren't the droids you're looking for. |
And I have a default layout that contains "{{ content | number_of_words }}" And I have a default layout that contains "{{ content | number_of_words }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "7" in "_site/2009/03/27/star-wars.html" And I should see "7" in "_site/2009/03/27/star-wars.html"
Scenario: Convert an array into a sentence Scenario: Convert an array into a sentence
@ -44,7 +47,8 @@ Feature: Embed filters
| Star Wars | 2009-03-27 | default | [scifi, movies, force] | These aren't the droids you're looking for. | | Star Wars | 2009-03-27 | default | [scifi, movies, force] | These aren't the droids you're looking for. |
And I have a default layout that contains "{{ page.tags | array_to_sentence_string }}" And I have a default layout that contains "{{ page.tags | array_to_sentence_string }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "scifi, movies, and force" in "_site/2009/03/27/star-wars.html" And I should see "scifi, movies, and force" in "_site/2009/03/27/star-wars.html"
Scenario: Markdownify a given string Scenario: Markdownify a given string
@ -55,7 +59,8 @@ Feature: Embed filters
| Star Wars | 2009-03-27 | default | These aren't the droids you're looking for. | | Star Wars | 2009-03-27 | default | These aren't the droids you're looking for. |
And I have a default layout that contains "By {{ '_Obi-wan_' | markdownify }}" And I have a default layout that contains "By {{ '_Obi-wan_' | markdownify }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "By <p><em>Obi-wan</em></p>" in "_site/2009/03/27/star-wars.html" And I should see "By <p><em>Obi-wan</em></p>" in "_site/2009/03/27/star-wars.html"
Scenario: Sort by an arbitrary variable Scenario: Sort by an arbitrary variable
@ -68,7 +73,8 @@ Feature: Embed filters
| Page-2 | default | 6 | Something | | Page-2 | default | 6 | Something |
And I have a default layout that contains "{{ site.pages | sort:'value' | map:'title' | join:', ' }}" And I have a default layout that contains "{{ site.pages | sort:'value' | map:'title' | join:', ' }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see exactly "Page-2, Page-1" in "_site/page-1.html" And I should see exactly "Page-2, Page-1" in "_site/page-1.html"
And I should see exactly "Page-2, Page-1" in "_site/page-2.html" And I should see exactly "Page-2, Page-1" in "_site/page-2.html"
@ -85,7 +91,8 @@ Feature: Embed filters
| default | Jump | | default | Jump |
And I have a default layout that contains "{% assign sorted_pages = site.pages | sort: 'title' %}The rule of {{ sorted_pages.size }}: {% for p in sorted_pages %}{{ p.content | strip_html | strip_newlines }}, {% endfor %}" And I have a default layout that contains "{% assign sorted_pages = site.pages | sort: 'title' %}The rule of {{ sorted_pages.size }}: {% for p in sorted_pages %}{{ p.content | strip_html | strip_newlines }}, {% endfor %}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see exactly "The rule of 3: Jump, Fly, Run," in "_site/bird.html" And I should see exactly "The rule of 3: Jump, Fly, Run," in "_site/bird.html"
Scenario: Sort pages by the title ordering pages without title last Scenario: Sort pages by the title ordering pages without title last
@ -101,5 +108,6 @@ Feature: Embed filters
| default | Jump | | default | Jump |
And I have a default layout that contains "{% assign sorted_pages = site.pages | sort: 'title', 'last' %}The rule of {{ sorted_pages.size }}: {% for p in sorted_pages %}{{ p.content | strip_html | strip_newlines }}, {% endfor %}" And I have a default layout that contains "{% assign sorted_pages = site.pages | sort: 'title', 'last' %}The rule of {{ sorted_pages.size }}: {% for p in sorted_pages %}{{ p.content | strip_html | strip_newlines }}, {% endfor %}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see exactly "The rule of 3: Fly, Run, Jump," in "_site/bird.html" And I should see exactly "The rule of 3: Fly, Run, Jump," in "_site/bird.html"

View File

@ -12,7 +12,8 @@ Feature: frontmatter defaults
And I have a configuration file with "defaults" set to "[{scope: {path: ""}, values: {layout: "pretty"}}]" And I have a configuration file with "defaults" set to "[{scope: {path: ""}, values: {layout: "pretty"}}]"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "THIS IS THE LAYOUT: <p>just some post</p>" in "_site/2013/09/11/default-layout.html" And I should see "THIS IS THE LAYOUT: <p>just some post</p>" in "_site/2013/09/11/default-layout.html"
And I should see "THIS IS THE LAYOUT: just some page" in "_site/index.html" And I should see "THIS IS THE LAYOUT: just some page" in "_site/index.html"
@ -24,7 +25,8 @@ Feature: frontmatter defaults
And I have an "index.html" page that contains "just {{page.custom}} by {{page.author}}" And I have an "index.html" page that contains "just {{page.custom}} by {{page.author}}"
And I have a configuration file with "defaults" set to "[{scope: {path: ""}, values: {custom: "some special data", author: "Ben"}}]" And I have a configuration file with "defaults" set to "[{scope: {path: ""}, values: {custom: "some special data", author: "Ben"}}]"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "<p>some special data</p>\n<div>Ben</div>" in "_site/2013/09/11/default-data.html" And I should see "<p>some special data</p>\n<div>Ben</div>" in "_site/2013/09/11/default-data.html"
And I should see "just some special data by Ben" in "_site/index.html" And I should see "just some special data by Ben" in "_site/index.html"
@ -48,7 +50,8 @@ Feature: frontmatter defaults
And I have a configuration file with "defaults" set to "[{scope: {path: "special"}, values: {layout: "subfolder", description: "the special section"}}, {scope: {path: ""}, values: {layout: "root", description: "the webpage"}}]" And I have a configuration file with "defaults" set to "[{scope: {path: "special"}, values: {layout: "subfolder", description: "the special section"}}, {scope: {path: ""}, values: {layout: "root", description: "the webpage"}}]"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "root: <p>info on the webpage</p>" in "_site/2013/10/14/about.html" And I should see "root: <p>info on the webpage</p>" in "_site/2013/10/14/about.html"
And I should see "subfolder: <p>info on the special section</p>" in "_site/special/2013/10/14/about.html" And I should see "subfolder: <p>info on the special section</p>" in "_site/special/2013/10/14/about.html"
And I should see "root: Overview for the webpage" in "_site/index.html" And I should see "root: Overview for the webpage" in "_site/index.html"
@ -71,7 +74,8 @@ Feature: frontmatter defaults
And I have a configuration file with "defaults" set to "[{scope: {path: "special"}, values: {layout: "main"}}, {scope: {path: "special/_posts"}, values: {layout: "main"}}, {scope: {path: "_posts"}, values: {layout: "main"}}]" And I have a configuration file with "defaults" set to "[{scope: {path: "special"}, values: {layout: "main"}}, {scope: {path: "special/_posts"}, values: {layout: "main"}}, {scope: {path: "_posts"}, values: {layout: "main"}}]"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "main: <p>content of site/2013/10/14/about.html</p>" in "_site/2013/10/14/about.html" And I should see "main: <p>content of site/2013/10/14/about.html</p>" in "_site/2013/10/14/about.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/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"
@ -132,7 +136,8 @@ Feature: frontmatter defaults
myval: "Test" myval: "Test"
""" """
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Value: Test" in "_site/slides/slide1.html" And I should see "Value: Test" in "_site/slides/slide1.html"
Scenario: Override frontmatter defaults inside a collection Scenario: Override frontmatter defaults inside a collection
@ -159,7 +164,8 @@ Feature: frontmatter defaults
myval: "Test" myval: "Test"
""" """
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Value: Override" in "_site/slides/slide2.html" And I should see "Value: Override" in "_site/slides/slide2.html"
Scenario: Deep merge frontmatter defaults Scenario: Deep merge frontmatter defaults

View File

@ -24,7 +24,8 @@ Feature: Hooks
end end
""" """
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "mytinypage" in "_site/foo.html" And I should see "mytinypage" in "_site/foo.html"
Scenario: Modify the payload before rendering the site Scenario: Modify the payload before rendering the site
@ -37,7 +38,8 @@ Feature: Hooks
end end
""" """
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "myparam!" in "_site/index.html" And I should see "myparam!" in "_site/index.html"
Scenario: Modify the site contents after reading Scenario: Modify the site contents after reading
@ -51,7 +53,8 @@ Feature: Hooks
end end
""" """
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And the "_site/page1.html" file should not exist And the "_site/page1.html" file should not exist
And I should see "page2" in "_site/page2.html" And I should see "page2" in "_site/page2.html"
@ -67,7 +70,8 @@ Feature: Hooks
""" """
And I have a "page1.html" page that contains "page1" And I have a "page1.html" page that contains "page1"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "page1" in "_site/firstpage.html" And I should see "page1" in "_site/firstpage.html"
Scenario: Alter a page right after it is initialized Scenario: Alter a page right after it is initialized
@ -81,7 +85,8 @@ Feature: Hooks
""" """
And I have a "page1.html" page that contains "page1" And I have a "page1.html" page that contains "page1"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "page1" in "_site/renamed.html" And I should see "page1" in "_site/renamed.html"
Scenario: Alter the payload for one page but not another Scenario: Alter the payload for one page but not another
@ -138,7 +143,8 @@ Feature: Hooks
| title | date | layout | content | | title | date | layout | content |
| entry1 | 2015-03-14 | nil | {{ page.harold }} | | entry1 | 2015-03-14 | nil | {{ page.harold }} |
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "pbagrag sbe ragel1." in "_site/2015/03/14/entry1.html" And I should see "pbagrag sbe ragel1." in "_site/2015/03/14/entry1.html"
Scenario: Alter the payload for certain posts Scenario: Alter the payload for certain posts
@ -268,7 +274,8 @@ Feature: Hooks
{{ site.memes.first.text }} {{ site.memes.first.text }}
""" """
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "all your base are belong to us" in "_site/index.html" And I should see "all your base are belong to us" in "_site/index.html"
Scenario: Update a document after rendering it, but before writing it to disk Scenario: Update a document after rendering it, but before writing it to disk
@ -294,7 +301,8 @@ Feature: Hooks
{{ page.text }} {{ page.text }}
""" """
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "<p class=\"meme\">all your base are belong to us" in "_site/memes/doc1.html" And I should see "<p class=\"meme\">all your base are belong to us" in "_site/memes/doc1.html"
Scenario: Perform an action after every document is written Scenario: Perform an action after every document is written
@ -322,5 +330,6 @@ Feature: Hooks
{{ page.text }} {{ page.text }}
""" """
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Wrote document 0" in "_site/document-build.log" And I should see "Wrote document 0" in "_site/document-build.log"

View File

@ -19,7 +19,8 @@ Feature: Include tags
| Parameter syntax | 2013-04-12 | html | {% include params.html param1_or_2="value" %} | | Parameter syntax | 2013-04-12 | html | {% include params.html param1_or_2="value" %} |
| Pass a variable | 2013-06-22 | html | {% assign var = 'some text' %}{% include params.html local=var title=page.title %} | | Pass a variable | 2013-06-22 | html | {% assign var = 'some text' %}{% include params.html local=var title=page.title %} |
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "<header>My awesome blog header: myparam</header>" in "_site/2013/03/21/include-files.html" And I should see "<header>My awesome blog header: myparam</header>" in "_site/2013/03/21/include-files.html"
And I should not see "myparam" in "_site/2013/03/21/ignore-params-if-unused.html" And I should not see "myparam" in "_site/2013/03/21/ignore-params-if-unused.html"
And I should see "<li>date = today</li>" in "_site/2013/03/21/list-multiple-parameters.html" And I should see "<li>date = today</li>" in "_site/2013/03/21/list-multiple-parameters.html"
@ -44,7 +45,8 @@ Feature: Include tags
| include_file2 | parametrized.html | | include_file2 | parametrized.html |
And I have an "index.html" page that contains "{% include {{site.include_file1}} %} that {% include {{site.include_file2}} what='parameters' %}" And I have an "index.html" page that contains "{% include {{site.include_file1}} %} that {% include {{site.include_file2}} what='parameters' %}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "a snippet that works with parameters" in "_site/index.html" And I should see "a snippet that works with parameters" in "_site/index.html"
Scenario: Include a variable file in a loop Scenario: Include a variable file in a loop
@ -53,7 +55,8 @@ Feature: Include tags
And I have an "_includes/two.html" file that contains "two" And I have an "_includes/two.html" file that contains "two"
And I have an "index.html" page with files "[one.html, two.html]" that contains "{% for file in page.files %}{% include {{file}} %} {% endfor %}" And I have an "index.html" page with files "[one.html, two.html]" that contains "{% for file in page.files %}{% include {{file}} %} {% endfor %}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "one two" in "_site/index.html" And I should see "one two" in "_site/index.html"
Scenario: Include a file with variables and filters Scenario: Include a file with variables and filters
@ -64,7 +67,8 @@ Feature: Include tags
| include_file | one | | include_file | one |
And I have an "index.html" page that contains "{% include {{ site.include_file | append: '.html' }} %}" And I have an "index.html" page that contains "{% include {{ site.include_file | append: '.html' }} %}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "one included" in "_site/index.html" And I should see "one included" in "_site/index.html"
Scenario: Include a file with partial variables Scenario: Include a file with partial variables
@ -75,7 +79,8 @@ Feature: Include tags
| include_file | one | | include_file | one |
And I have an "index.html" page that contains "{% include {{ site.include_file }}.html %}" And I have an "index.html" page that contains "{% include {{ site.include_file }}.html %}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "one included" in "_site/index.html" And I should see "one included" in "_site/index.html"
Scenario: Include a file and rebuild when include content is changed Scenario: Include a file and rebuild when include content is changed
@ -83,7 +88,8 @@ Feature: Include tags
And I have an "_includes/one.html" file that contains "include" And I have an "_includes/one.html" file that contains "include"
And I have an "index.html" page that contains "{% include one.html %}" And I have an "index.html" page that contains "{% include one.html %}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "include" in "_site/index.html" And I should see "include" in "_site/index.html"
When I wait 1 second When I wait 1 second
Then I have an "_includes/one.html" file that contains "include content changed" Then I have an "_includes/one.html" file that contains "include content changed"
@ -95,5 +101,6 @@ Feature: Include tags
And I have an "_includes/header-en.html" file that contains "include" And I have an "_includes/header-en.html" file that contains "include"
And I have an "index.html" page that contains "{% assign name = 'header' %}{% assign locale = 'en' %}{% include {{name}}-{{locale}}.html %}" And I have an "index.html" page that contains "{% assign name = 'header' %}{% assign locale = 'en' %}{% include {{name}}-{{locale}}.html %}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "include" in "_site/index.html" And I should see "include" in "_site/index.html"

View File

@ -11,10 +11,12 @@ Feature: Incremental rebuild
| Wargames | 2009-03-27 | default | The only winning move is not to play. | | Wargames | 2009-03-27 | default | The only winning move is not to play. |
And I have a default layout that contains "Post Layout: {{ content }}" And I have a default layout that contains "Post Layout: {{ content }}"
When I run jekyll build -I When I run jekyll build -I
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Post Layout: <p>The only winning move is not to play.</p>" in "_site/2009/03/27/wargames.html" And I should see "Post Layout: <p>The only winning move is not to play.</p>" in "_site/2009/03/27/wargames.html"
When I run jekyll build -I When I run jekyll build -I
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Post Layout: <p>The only winning move is not to play.</p>" in "_site/2009/03/27/wargames.html" And I should see "Post Layout: <p>The only winning move is not to play.</p>" in "_site/2009/03/27/wargames.html"
Scenario: Generate a metadata file Scenario: Generate a metadata file
@ -25,12 +27,14 @@ Feature: Incremental rebuild
Scenario: Rebuild when content is changed Scenario: Rebuild when content is changed
Given I have an "index.html" file that contains "Basic Site" Given I have an "index.html" file that contains "Basic Site"
When I run jekyll build -I When I run jekyll build -I
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Basic Site" in "_site/index.html" And I should see "Basic Site" in "_site/index.html"
When I wait 1 second When I wait 1 second
Then I have an "index.html" file that contains "Bacon Site" Then I have an "index.html" file that contains "Bacon Site"
When I run jekyll build -I When I run jekyll build -I
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Bacon Site" in "_site/index.html" And I should see "Bacon Site" in "_site/index.html"
Scenario: Rebuild when layout is changed Scenario: Rebuild when layout is changed
@ -38,12 +42,14 @@ Feature: Incremental rebuild
And I have an "index.html" page with layout "default" that contains "Basic Site with Layout" And I have an "index.html" page with layout "default" that contains "Basic Site with Layout"
And I have a default layout that contains "Page Layout: {{ content }}" And I have a default layout that contains "Page Layout: {{ content }}"
When I run jekyll build -I When I run jekyll build -I
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Page Layout: Basic Site with Layout" in "_site/index.html" And I should see "Page Layout: Basic Site with Layout" in "_site/index.html"
When I wait 1 second When I wait 1 second
Then I have a default layout that contains "Page Layout Changed: {{ content }}" Then I have a default layout that contains "Page Layout Changed: {{ content }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Page Layout Changed: Basic Site with Layout" in "_site/index.html" And I should see "Page Layout Changed: Basic Site with Layout" in "_site/index.html"
Scenario: Rebuild when an include is changed Scenario: Rebuild when an include is changed
@ -51,10 +57,12 @@ Feature: Incremental rebuild
And I have an "index.html" page that contains "Basic Site with include tag: {% include about.textile %}" And I have an "index.html" page that contains "Basic Site with include tag: {% include about.textile %}"
And I have an "_includes/about.textile" file that contains "Generated by Jekyll" And I have an "_includes/about.textile" file that contains "Generated by Jekyll"
When I run jekyll build -I When I run jekyll build -I
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Basic Site with include tag: Generated by Jekyll" in "_site/index.html" And I should see "Basic Site with include tag: Generated by Jekyll" in "_site/index.html"
When I wait 1 second When I wait 1 second
Then I have an "_includes/about.textile" file that contains "Regenerated by Jekyll" Then I have an "_includes/about.textile" file that contains "Regenerated by Jekyll"
When I run jekyll build -I When I run jekyll build -I
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Basic Site with include tag: Regenerated by Jekyll" in "_site/index.html" And I should see "Basic Site with include tag: Regenerated by Jekyll" in "_site/index.html"

View File

@ -11,7 +11,8 @@ Feature: Markdown
| title | date | content | type | | title | date | content | type |
| Hackers | 2009-03-27 | # My Title | markdown | | Hackers | 2009-03-27 | # My Title | markdown |
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Index" in "_site/index.html" And I should see "Index" in "_site/index.html"
And I should see "<h1 id=\"my-title\">My Title</h1>" in "_site/2009/03/27/hackers.html" And I should see "<h1 id=\"my-title\">My Title</h1>" in "_site/2009/03/27/hackers.html"
And I should see "<h1 id=\"my-title\">My Title</h1>" in "_site/index.html" And I should see "<h1 id=\"my-title\">My Title</h1>" in "_site/index.html"
@ -27,6 +28,7 @@ Feature: Markdown
| title | date | content | type | | title | date | content | type |
| Hackers | 2009-03-27 | # My Title | markdown | | Hackers | 2009-03-27 | # My Title | markdown |
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Index" in "_site/index.html" And I should see "Index" in "_site/index.html"
And I should see "<h1 id=\"my-title\">My Title</h1>" in "_site/index.html" And I should see "<h1 id=\"my-title\">My Title</h1>" in "_site/index.html"

View File

@ -10,7 +10,8 @@ Feature: Fancy permalinks
| None Permalink Schema | 2009-03-27 | Totally nothing. | | None Permalink Schema | 2009-03-27 | Totally nothing. |
And I have a configuration file with "permalink" set to "none" And I have a configuration file with "permalink" set to "none"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Totally nothing." in "_site/none-permalink-schema.html" And I should see "Totally nothing." in "_site/none-permalink-schema.html"
Scenario: Use pretty permalink schema Scenario: Use pretty permalink schema
@ -20,7 +21,8 @@ Feature: Fancy permalinks
| Pretty Permalink Schema | 2009-03-27 | Totally wordpress. | | Pretty Permalink Schema | 2009-03-27 | Totally wordpress. |
And I have a configuration file with "permalink" set to "pretty" And I have a configuration file with "permalink" set to "pretty"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Totally wordpress." in "_site/2009/03/27/pretty-permalink-schema/index.html" And I should see "Totally wordpress." in "_site/2009/03/27/pretty-permalink-schema/index.html"
Scenario: Use pretty permalink schema for pages Scenario: Use pretty permalink schema for pages
@ -29,7 +31,8 @@ Feature: Fancy permalinks
And I have an "sitemap.xml" page that contains "Totally uhm, sitemap" And I have an "sitemap.xml" page that contains "Totally uhm, sitemap"
And I have a configuration file with "permalink" set to "pretty" And I have a configuration file with "permalink" set to "pretty"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Totally index" in "_site/index.html" And I should see "Totally index" in "_site/index.html"
And I should see "Totally awesome" in "_site/awesome/index.html" And I should see "Totally awesome" in "_site/awesome/index.html"
And I should see "Totally uhm, sitemap" in "_site/sitemap.xml" And I should see "Totally uhm, sitemap" in "_site/sitemap.xml"
@ -41,7 +44,8 @@ Feature: Fancy permalinks
| Custom Permalink Schema | stuff | 2009-03-27 | Totally custom. | | Custom Permalink Schema | stuff | 2009-03-27 | Totally custom. |
And I have a configuration file with "permalink" set to "/blog/:year/:month/:day/:title/" And I have a configuration file with "permalink" set to "/blog/:year/:month/:day/:title/"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Totally custom." in "_site/blog/2009/03/27/custom-permalink-schema/index.html" And I should see "Totally custom." in "_site/blog/2009/03/27/custom-permalink-schema/index.html"
Scenario: Use custom permalink schema with category Scenario: Use custom permalink schema with category
@ -51,7 +55,8 @@ Feature: Fancy permalinks
| Custom Permalink Schema | stuff | 2009-03-27 | Totally custom. | | Custom Permalink Schema | stuff | 2009-03-27 | Totally custom. |
And I have a configuration file with "permalink" set to "/:categories/:title.html" And I have a configuration file with "permalink" set to "/:categories/:title.html"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Totally custom." in "_site/stuff/custom-permalink-schema.html" And I should see "Totally custom." in "_site/stuff/custom-permalink-schema.html"
Scenario: Use custom permalink schema with squished date Scenario: Use custom permalink schema with squished date
@ -61,7 +66,8 @@ Feature: Fancy permalinks
| Custom Permalink Schema | stuff | 2009-03-27 | Totally custom. | | Custom Permalink Schema | stuff | 2009-03-27 | Totally custom. |
And I have a configuration file with "permalink" set to "/:month-:day-:year/:title.html" And I have a configuration file with "permalink" set to "/:month-:day-:year/:title.html"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Totally custom." in "_site/03-27-2009/custom-permalink-schema.html" And I should see "Totally custom." in "_site/03-27-2009/custom-permalink-schema.html"
Scenario: Use custom permalink schema with date and time Scenario: Use custom permalink schema with date and time
@ -74,7 +80,8 @@ Feature: Fancy permalinks
| permalink | "/:year:month:day:hour:minute:second.html" | | permalink | "/:year:month:day:hour:minute:second.html" |
| timezone | UTC | | timezone | UTC |
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Totally custom." in "_site/20090327223107.html" And I should see "Totally custom." in "_site/20090327223107.html"
Scenario: Use per-post permalink Scenario: Use per-post permalink
@ -83,7 +90,8 @@ Feature: Fancy permalinks
| title | date | permalink | content | | title | date | permalink | content |
| Some post | 2013-04-14 | /custom/posts/1/ | bla bla | | Some post | 2013-04-14 | /custom/posts/1/ | bla bla |
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And the _site/custom/posts/1 directory should exist And the _site/custom/posts/1 directory should exist
And I should see "bla bla" in "_site/custom/posts/1/index.html" And I should see "bla bla" in "_site/custom/posts/1/index.html"
@ -93,7 +101,8 @@ Feature: Fancy permalinks
| title | date | permalink | content | | title | date | permalink | content |
| Some post | 2013-04-14 | /custom/posts/some.html | bla bla | | Some post | 2013-04-14 | /custom/posts/some.html | bla bla |
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And the _site/custom/posts directory should exist And the _site/custom/posts directory should exist
And I should see "bla bla" in "_site/custom/posts/some.html" And I should see "bla bla" in "_site/custom/posts/some.html"
@ -102,7 +111,8 @@ Feature: Fancy permalinks
And I have an "_posts/2009-03-27-Pretty-Permalink-Schema.md" page that contains "Totally wordpress" And I have an "_posts/2009-03-27-Pretty-Permalink-Schema.md" page that contains "Totally wordpress"
And I have a configuration file with "permalink" set to "pretty" And I have a configuration file with "permalink" set to "pretty"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Totally wordpress." in "_site/2009/03/27/Pretty-Permalink-Schema/index.html" And I should see "Totally wordpress." in "_site/2009/03/27/Pretty-Permalink-Schema/index.html"
Scenario: Use custom permalink schema with cased file name Scenario: Use custom permalink schema with cased file name
@ -110,7 +120,8 @@ Feature: Fancy permalinks
And I have an "_posts/2009-03-27-Custom-Schema.md" page with title "Custom Schema" that contains "Totally awesome" And I have an "_posts/2009-03-27-Custom-Schema.md" page with title "Custom Schema" that contains "Totally awesome"
And I have a configuration file with "permalink" set to "/:year/:month/:day/:slug/" And I have a configuration file with "permalink" set to "/:year/:month/:day/:slug/"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Totally awesome" in "_site/2009/03/27/custom-schema/index.html" And I should see "Totally awesome" in "_site/2009/03/27/custom-schema/index.html"
Scenario: Use pretty permalink schema with title containing underscore Scenario: Use pretty permalink schema with title containing underscore
@ -118,7 +129,8 @@ Feature: Fancy permalinks
And I have an "_posts/2009-03-27-Custom_Schema.md" page with title "Custom Schema" that contains "Totally awesome" And I have an "_posts/2009-03-27-Custom_Schema.md" page with title "Custom Schema" that contains "Totally awesome"
And I have a configuration file with "permalink" set to "pretty" And I have a configuration file with "permalink" set to "pretty"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Totally awesome" in "_site/2009/03/27/Custom_Schema/index.html" And I should see "Totally awesome" in "_site/2009/03/27/Custom_Schema/index.html"
Scenario: Use a non-HTML file extension in the permalink Scenario: Use a non-HTML file extension in the permalink

View File

@ -6,7 +6,8 @@ Feature: Configuring and using plugins
Given I have an "index.html" file that contains "Whatever" Given I have an "index.html" file that contains "Whatever"
And I have a configuration file with "gems" set to "[jekyll_test_plugin]" And I have a configuration file with "gems" set to "[jekyll_test_plugin]"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Whatever" in "_site/index.html" And I should see "Whatever" in "_site/index.html"
And I should see "this is a test" in "_site/test.txt" And I should see "this is a test" in "_site/test.txt"
@ -17,7 +18,8 @@ Feature: Configuring and using plugins
| gems | [jekyll_test_plugin] | | gems | [jekyll_test_plugin] |
| whitelist | [] | | whitelist | [] |
When I run jekyll build --safe When I run jekyll build --safe
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Whatever" in "_site/index.html" And I should see "Whatever" in "_site/index.html"
And the "_site/test.txt" file should not exist And the "_site/test.txt" file should not exist
@ -28,7 +30,8 @@ Feature: Configuring and using plugins
| gems | [jekyll_test_plugin, jekyll_test_plugin_malicious] | | gems | [jekyll_test_plugin, jekyll_test_plugin_malicious] |
| whitelist | [jekyll_test_plugin] | | whitelist | [jekyll_test_plugin] |
When I run jekyll build --safe When I run jekyll build --safe
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Whatever" in "_site/index.html" And I should see "Whatever" in "_site/index.html"
And the "_site/test.txt" file should exist And the "_site/test.txt" file should exist
And I should see "this is a test" in "_site/test.txt" And I should see "this is a test" in "_site/test.txt"

View File

@ -11,7 +11,8 @@ Feature: Post data
| Star Wars | 2009-03-27 | simple | Luke, I am your father. | | Star Wars | 2009-03-27 | simple | Luke, I am your father. |
And I have a simple layout that contains "Post title: {{ page.title }}" And I have a simple layout that contains "Post title: {{ page.title }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Post title: Star Wars" in "_site/2009/03/27/star-wars.html" And I should see "Post title: Star Wars" in "_site/2009/03/27/star-wars.html"
Scenario: Use post.url variable Scenario: Use post.url variable
@ -22,7 +23,8 @@ Feature: Post data
| Star Wars | 2009-03-27 | simple | Luke, I am your father. | | Star Wars | 2009-03-27 | simple | Luke, I am your father. |
And I have a simple layout that contains "Post url: {{ page.url }}" And I have a simple layout that contains "Post url: {{ page.url }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Post url: /2009/03/27/star-wars.html" in "_site/2009/03/27/star-wars.html" And I should see "Post url: /2009/03/27/star-wars.html" in "_site/2009/03/27/star-wars.html"
Scenario: Use post.date variable Scenario: Use post.date variable
@ -33,7 +35,8 @@ Feature: Post data
| Star Wars | 2009-03-27 | simple | Luke, I am your father. | | Star Wars | 2009-03-27 | simple | Luke, I am your father. |
And I have a simple layout that contains "Post date: {{ page.date | date_to_string }}" And I have a simple layout that contains "Post date: {{ page.date | date_to_string }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Post date: 27 Mar 2009" in "_site/2009/03/27/star-wars.html" And I should see "Post date: 27 Mar 2009" in "_site/2009/03/27/star-wars.html"
Scenario: Use post.id variable Scenario: Use post.id variable
@ -44,7 +47,8 @@ Feature: Post data
| Star Wars | 2009-03-27 | simple | Luke, I am your father. | | Star Wars | 2009-03-27 | simple | Luke, I am your father. |
And I have a simple layout that contains "Post id: {{ page.id }}" And I have a simple layout that contains "Post id: {{ page.id }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Post id: /2009/03/27/star-wars" in "_site/2009/03/27/star-wars.html" And I should see "Post id: /2009/03/27/star-wars" in "_site/2009/03/27/star-wars.html"
Scenario: Use post.content variable Scenario: Use post.content variable
@ -55,7 +59,8 @@ Feature: Post data
| Star Wars | 2009-03-27 | simple | Luke, I am your father. | | Star Wars | 2009-03-27 | simple | Luke, I am your father. |
And I have a simple layout that contains "Post content: {{ content }}" And I have a simple layout that contains "Post content: {{ content }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Post content: <p>Luke, I am your father.</p>" in "_site/2009/03/27/star-wars.html" And I should see "Post content: <p>Luke, I am your father.</p>" in "_site/2009/03/27/star-wars.html"
Scenario: Use post.categories variable when category is in a folder Scenario: Use post.categories variable when category is in a folder
@ -67,7 +72,8 @@ Feature: Post data
| Star Wars | 2009-03-27 | simple | Luke, I am your father. | | Star Wars | 2009-03-27 | simple | Luke, I am your father. |
And I have a simple layout that contains "Post category: {{ page.categories }}" And I have a simple layout that contains "Post category: {{ page.categories }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Post category: movies" in "_site/movies/2009/03/27/star-wars.html" And I should see "Post category: movies" in "_site/movies/2009/03/27/star-wars.html"
Scenario: Use post.categories variable when category is in a folder and has category in YAML Scenario: Use post.categories variable when category is in a folder and has category in YAML
@ -79,7 +85,8 @@ Feature: Post data
| Star Wars | 2009-03-27 | simple | film | Luke, I am your father. | | Star Wars | 2009-03-27 | simple | film | Luke, I am your father. |
And I have a simple layout that contains "Post category: {{ page.categories }}" And I have a simple layout that contains "Post category: {{ page.categories }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Post category: movies" in "_site/movies/film/2009/03/27/star-wars.html" And I should see "Post category: movies" in "_site/movies/film/2009/03/27/star-wars.html"
Scenario: Use post.categories variable when category is in a folder and has categories in YAML Scenario: Use post.categories variable when category is in a folder and has categories in YAML
@ -91,7 +98,8 @@ Feature: Post data
| Star Wars | 2009-03-27 | simple | [film, scifi] | Luke, I am your father. | | Star Wars | 2009-03-27 | simple | [film, scifi] | Luke, I am your father. |
And I have a simple layout that contains "Post category: {{ page.categories }}" And I have a simple layout that contains "Post category: {{ page.categories }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Post category: movies" in "_site/movies/film/scifi/2009/03/27/star-wars.html" And I should see "Post category: movies" in "_site/movies/film/scifi/2009/03/27/star-wars.html"
Scenario: Use post.categories variable when category is in a folder and duplicated category is in YAML Scenario: Use post.categories variable when category is in a folder and duplicated category is in YAML
@ -103,7 +111,8 @@ Feature: Post data
| Star Wars | 2009-03-27 | simple | movies | Luke, I am your father. | | Star Wars | 2009-03-27 | simple | movies | Luke, I am your father. |
And I have a simple layout that contains "Post category: {{ page.categories }}" And I have a simple layout that contains "Post category: {{ page.categories }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Post category: movies" in "_site/movies/2009/03/27/star-wars.html" And I should see "Post category: movies" in "_site/movies/2009/03/27/star-wars.html"
Scenario: Use post.tags variable Scenario: Use post.tags variable
@ -114,7 +123,8 @@ Feature: Post data
| Star Wars | 2009-05-18 | simple | twist | Luke, I am your father. | | Star Wars | 2009-05-18 | simple | twist | Luke, I am your father. |
And I have a simple layout that contains "Post tags: {{ page.tags }}" And I have a simple layout that contains "Post tags: {{ page.tags }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Post tags: twist" in "_site/2009/05/18/star-wars.html" And I should see "Post tags: twist" in "_site/2009/05/18/star-wars.html"
Scenario: Use post.categories variable when categories are in folders Scenario: Use post.categories variable when categories are in folders
@ -127,7 +137,8 @@ Feature: Post data
| Star Wars | 2009-03-27 | simple | Luke, I am your father. | | Star Wars | 2009-03-27 | simple | Luke, I am your father. |
And I have a simple layout that contains "Post categories: {{ page.categories | array_to_sentence_string }}" And I have a simple layout that contains "Post categories: {{ page.categories | array_to_sentence_string }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Post categories: scifi and movies" in "_site/scifi/movies/2009/03/27/star-wars.html" And I should see "Post categories: scifi and movies" in "_site/scifi/movies/2009/03/27/star-wars.html"
Scenario: Use post.categories variable when categories are in folders with mixed case Scenario: Use post.categories variable when categories are in folders with mixed case
@ -140,7 +151,8 @@ Feature: Post data
| Star Wars | 2009-03-27 | simple | Luke, I am your father. | | Star Wars | 2009-03-27 | simple | Luke, I am your father. |
And I have a simple layout that contains "Post categories: {{ page.categories | array_to_sentence_string }}" And I have a simple layout that contains "Post categories: {{ page.categories | array_to_sentence_string }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Post categories: scifi and Movies" in "_site/scifi/movies/2009/03/27/star-wars.html" And I should see "Post categories: scifi and Movies" in "_site/scifi/movies/2009/03/27/star-wars.html"
Scenario: Use post.categories variable when category is in YAML Scenario: Use post.categories variable when category is in YAML
@ -151,7 +163,8 @@ Feature: Post data
| Star Wars | 2009-03-27 | simple | movies | Luke, I am your father. | | Star Wars | 2009-03-27 | simple | movies | Luke, I am your father. |
And I have a simple layout that contains "Post category: {{ page.categories }}" And I have a simple layout that contains "Post category: {{ page.categories }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Post category: movies" in "_site/movies/2009/03/27/star-wars.html" And I should see "Post category: movies" in "_site/movies/2009/03/27/star-wars.html"
Scenario: Use post.categories variable when category is in YAML and is mixed-case Scenario: Use post.categories variable when category is in YAML and is mixed-case
@ -162,7 +175,8 @@ Feature: Post data
| Star Wars | 2009-03-27 | simple | Movies | Luke, I am your father. | | Star Wars | 2009-03-27 | simple | Movies | Luke, I am your father. |
And I have a simple layout that contains "Post category: {{ page.categories }}" And I have a simple layout that contains "Post category: {{ page.categories }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Post category: Movies" in "_site/movies/2009/03/27/star-wars.html" And I should see "Post category: Movies" in "_site/movies/2009/03/27/star-wars.html"
Scenario: Use post.categories variable when categories are in YAML Scenario: Use post.categories variable when categories are in YAML
@ -173,7 +187,8 @@ Feature: Post data
| Star Wars | 2009-03-27 | simple | ['scifi', 'movies'] | Luke, I am your father. | | Star Wars | 2009-03-27 | simple | ['scifi', 'movies'] | Luke, I am your father. |
And I have a simple layout that contains "Post categories: {{ page.categories | array_to_sentence_string }}" And I have a simple layout that contains "Post categories: {{ page.categories | array_to_sentence_string }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Post categories: scifi and movies" in "_site/scifi/movies/2009/03/27/star-wars.html" And I should see "Post categories: scifi and movies" in "_site/scifi/movies/2009/03/27/star-wars.html"
Scenario: Use post.categories variable when categories are in YAML and are duplicated Scenario: Use post.categories variable when categories are in YAML and are duplicated
@ -184,7 +199,8 @@ Feature: Post data
| Star Wars | 2009-03-27 | simple | ['movies', 'movies'] | Luke, I am your father. | | Star Wars | 2009-03-27 | simple | ['movies', 'movies'] | Luke, I am your father. |
And I have a simple layout that contains "Post category: {{ page.categories }}" And I have a simple layout that contains "Post category: {{ page.categories }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Post category: movies" in "_site/movies/2009/03/27/star-wars.html" And I should see "Post category: movies" in "_site/movies/2009/03/27/star-wars.html"
Scenario: Superdirectories of _posts applied to post.categories Scenario: Superdirectories of _posts applied to post.categories
@ -193,7 +209,8 @@ Feature: Post data
And I have a _layouts directory And I have a _layouts directory
And I have a simple layout that contains "Post category: {{ page.categories }}" And I have a simple layout that contains "Post category: {{ page.categories }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Post category: movies" in "_site/movies/2009/03/27/star-wars.html" And I should see "Post category: movies" in "_site/movies/2009/03/27/star-wars.html"
Scenario: Subdirectories of _posts not applied to post.categories Scenario: Subdirectories of _posts not applied to post.categories
@ -202,7 +219,8 @@ Feature: Post data
And I have a _layouts directory And I have a _layouts directory
And I have a simple layout that contains "Post category: {{ page.categories }}" And I have a simple layout that contains "Post category: {{ page.categories }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Post category: movies" in "_site/movies/2009/03/27/star-wars.html" And I should see "Post category: movies" in "_site/movies/2009/03/27/star-wars.html"
Scenario: Use post.categories variable when categories are in YAML with mixed case Scenario: Use post.categories variable when categories are in YAML with mixed case
@ -214,7 +232,8 @@ Feature: Post data
| Star Trek | 2013-03-17 | simple | ['SciFi', 'movies'] | Jean Luc, I am your father. | | Star Trek | 2013-03-17 | simple | ['SciFi', 'movies'] | Jean Luc, I am your father. |
And I have a simple layout that contains "Post categories: {{ page.categories | array_to_sentence_string }}" And I have a simple layout that contains "Post categories: {{ page.categories | array_to_sentence_string }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Post categories: scifi and Movies" in "_site/scifi/movies/2009/03/27/star-wars.html" And I should see "Post categories: scifi and Movies" in "_site/scifi/movies/2009/03/27/star-wars.html"
And I should see "Post categories: SciFi and movies" in "_site/scifi/movies/2013/03/17/star-trek.html" And I should see "Post categories: SciFi and movies" in "_site/scifi/movies/2013/03/17/star-trek.html"
@ -224,7 +243,8 @@ Feature: Post data
| title | type | date | content | | title | type | date | content |
| my-post | html | 2013-04-12 | Source path: {{ page.path }} | | my-post | html | 2013-04-12 | Source path: {{ page.path }} |
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Source path: <path_prefix>_posts/2013-04-12-my-post.html" in "_site/<dir>/2013/04/12/my-post.html" And I should see "Source path: <path_prefix>_posts/2013-04-12-my-post.html" in "_site/<dir>/2013/04/12/my-post.html"
Examples: Examples:
@ -239,7 +259,8 @@ Feature: Post data
| title | date | path | content | | title | date | path | content |
| override | 2013-04-12 | override-path.html | Non-custom path: {{ page.path }} | | override | 2013-04-12 | override-path.html | Non-custom path: {{ page.path }} |
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Non-custom path: _posts/2013-04-12-override.markdown" in "_site/2013/04/12/override.html" And I should see "Non-custom path: _posts/2013-04-12-override.markdown" in "_site/2013/04/12/override.html"
Scenario: Disable a post from being published Scenario: Disable a post from being published
@ -249,7 +270,8 @@ Feature: Post data
| title | date | layout | published | content | | title | date | layout | published | content |
| Star Wars | 2009-03-27 | simple | false | Luke, I am your father. | | Star Wars | 2009-03-27 | simple | false | Luke, I am your father. |
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And the "_site/2009/03/27/star-wars.html" file should not exist And the "_site/2009/03/27/star-wars.html" file should not exist
And I should see "Published!" in "_site/index.html" And I should see "Published!" in "_site/index.html"
@ -261,7 +283,8 @@ Feature: Post data
| Star Wars | 2009-03-27 | simple | Darth Vader | Luke, I am your father. | | Star Wars | 2009-03-27 | simple | Darth Vader | Luke, I am your father. |
And I have a simple layout that contains "Post author: {{ page.author }}" And I have a simple layout that contains "Post author: {{ page.author }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Post author: Darth Vader" in "_site/2009/03/27/star-wars.html" And I should see "Post author: Darth Vader" in "_site/2009/03/27/star-wars.html"
Scenario: Previous and next posts title Scenario: Previous and next posts title
@ -274,6 +297,7 @@ Feature: Post data
| Terminator | 2009-05-27 | ordered | Arnold | Sayonara, baby | | Terminator | 2009-05-27 | ordered | Arnold | Sayonara, baby |
And I have a ordered layout that contains "Previous post: {{ page.previous.title }} and next post: {{ page.next.title }}" And I have a ordered layout that contains "Previous post: {{ page.previous.title }} and next post: {{ page.next.title }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And 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 "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" And I should see "Previous post: Some like it hot" in "_site/2009/05/27/terminator.html"

View File

@ -12,7 +12,8 @@ Feature: Post excerpts
| title | date | layout | content | | title | date | layout | content |
| entry1 | 2007-12-31 | post | content for entry1. | | entry1 | 2007-12-31 | post | content for entry1. |
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see exactly "<p>content for entry1.</p>" in "_site/index.html" And I should see exactly "<p>content for entry1.</p>" in "_site/index.html"
Scenario: An excerpt from a post with a layout Scenario: An excerpt from a post with a layout
@ -24,7 +25,8 @@ Feature: Post excerpts
| title | date | layout | content | | title | date | layout | content |
| entry1 | 2007-12-31 | post | content for entry1. | | entry1 | 2007-12-31 | post | content for entry1. |
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And the _site/2007 directory should exist And the _site/2007 directory should exist
And the _site/2007/12 directory should exist And the _site/2007/12 directory should exist
And the _site/2007/12/31 directory should exist And the _site/2007/12/31 directory should exist
@ -41,7 +43,8 @@ Feature: Post excerpts
| title | date | layout | content | | title | date | layout | content |
| entry1 | 2007-12-31 | post | content for entry1. | | entry1 | 2007-12-31 | post | content for entry1. |
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And the _site/2007 directory should exist And the _site/2007 directory should exist
And the _site/2007/12 directory should exist And the _site/2007/12 directory should exist
And the _site/2007/12/31 directory should exist And the _site/2007/12/31 directory should exist

View File

@ -16,7 +16,8 @@ Feature: Rendering
Given I have a "index.html" page with layout "simple" that contains "Hi there, Jekyll {{ jekyll.environment }}!" Given I have a "index.html" page with layout "simple" that contains "Hi there, Jekyll {{ jekyll.environment }}!"
And I have a simple layout that contains "{{ content }}Ahoy, indeed!" And I have a simple layout that contains "{{ content }}Ahoy, indeed!"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Hi there, Jekyll development!\nAhoy, indeed" in "_site/index.html" And I should see "Hi there, Jekyll development!\nAhoy, indeed" in "_site/index.html"
Scenario: Don't place asset files in layout Scenario: Don't place asset files in layout
@ -25,7 +26,8 @@ Feature: Rendering
And I have a configuration file with "gems" set to "[jekyll-coffeescript]" And I have a configuration file with "gems" set to "[jekyll-coffeescript]"
And I have a simple layout that contains "{{ content }}Ahoy, indeed!" And I have a simple layout that contains "{{ content }}Ahoy, indeed!"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should not see "Ahoy, indeed!" in "_site/index.css" And I should not see "Ahoy, indeed!" in "_site/index.css"
And I should not see "Ahoy, indeed!" in "_site/index.js" And I should not see "Ahoy, indeed!" in "_site/index.js"
@ -33,18 +35,21 @@ Feature: Rendering
Given I have an "index.scss" page that contains ".foo-bar { color:{{site.color}}; }" Given I have an "index.scss" page that contains ".foo-bar { color:{{site.color}}; }"
And I have a configuration file with "color" set to "red" And I have a configuration file with "color" set to "red"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see ".foo-bar {\n color: red; }" in "_site/index.css" And I should see ".foo-bar {\n color: red; }" in "_site/index.css"
Scenario: Not render liquid in CoffeeScript without explicitly including jekyll-coffeescript Scenario: Not render liquid in CoffeeScript without explicitly including jekyll-coffeescript
Given I have an "index.coffee" page with animal "cicada" that contains "hey='for {{page.animal}}'" Given I have an "index.coffee" page with animal "cicada" that contains "hey='for {{page.animal}}'"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And the "_site/index.js" file should not exist And the "_site/index.js" file should not exist
Scenario: Render liquid in CoffeeScript with jekyll-coffeescript enabled Scenario: Render liquid in CoffeeScript with jekyll-coffeescript enabled
Given I have an "index.coffee" page with animal "cicada" that contains "hey='for {{page.animal}}'" Given I have an "index.coffee" page with animal "cicada" that contains "hey='for {{page.animal}}'"
And I have a configuration file with "gems" set to "[jekyll-coffeescript]" And I have a configuration file with "gems" set to "[jekyll-coffeescript]"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "hey = 'for cicada';" in "_site/index.js" And I should see "hey = 'for cicada';" in "_site/index.js"

View File

@ -8,7 +8,8 @@ Feature: Site configuration
And I have an "_sourcedir/index.html" file that contains "Changing source directory" And I have an "_sourcedir/index.html" file that contains "Changing source directory"
And I have a configuration file with "source" set to "_sourcedir" And I have a configuration file with "source" set to "_sourcedir"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Changing source directory" in "_site/index.html" And I should see "Changing source directory" in "_site/index.html"
Scenario: Change destination directory Scenario: Change destination directory
@ -66,27 +67,31 @@ Feature: Site configuration
Given I have an "index.markdown" page that contains "[Google](http://google.com)" Given I have an "index.markdown" page that contains "[Google](http://google.com)"
And I have a configuration file with "markdown" set to "rdiscount" And I have a configuration file with "markdown" set to "rdiscount"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "<a href=\"http://google.com\">Google</a>" in "_site/index.html" And I should see "<a href=\"http://google.com\">Google</a>" in "_site/index.html"
Scenario: Use Kramdown for markup Scenario: Use Kramdown for markup
Given I have an "index.markdown" page that contains "[Google](http://google.com)" Given I have an "index.markdown" page that contains "[Google](http://google.com)"
And I have a configuration file with "markdown" set to "kramdown" And I have a configuration file with "markdown" set to "kramdown"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "<a href=\"http://google.com\">Google</a>" in "_site/index.html" And I should see "<a href=\"http://google.com\">Google</a>" in "_site/index.html"
Scenario: Use Redcarpet for markup Scenario: Use Redcarpet for markup
Given I have an "index.markdown" page that contains "[Google](http://google.com)" Given I have an "index.markdown" page that contains "[Google](http://google.com)"
And I have a configuration file with "markdown" set to "redcarpet" And I have a configuration file with "markdown" set to "redcarpet"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "<a href=\"http://google.com\">Google</a>" in "_site/index.html" And I should see "<a href=\"http://google.com\">Google</a>" in "_site/index.html"
Scenario: Highlight code with pygments Scenario: Highlight code with pygments
Given I have an "index.html" page that contains "{% highlight ruby %} puts 'Hello world!' {% endhighlight %}" Given I have an "index.html" page that contains "{% highlight ruby %} puts 'Hello world!' {% endhighlight %}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Hello world!" in "_site/index.html" And I should see "Hello world!" in "_site/index.html"
And I should see "class=\"highlight\"" in "_site/index.html" And I should see "class=\"highlight\"" in "_site/index.html"
@ -94,7 +99,8 @@ Feature: Site configuration
Given I have an "index.html" page that contains "{% highlight ruby %} puts 'Hello world!' {% endhighlight %}" Given I have an "index.html" page that contains "{% highlight ruby %} puts 'Hello world!' {% endhighlight %}"
And I have a configuration file with "highlighter" set to "rouge" And I have a configuration file with "highlighter" set to "rouge"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Hello world!" in "_site/index.html" And I should see "Hello world!" in "_site/index.html"
And I should see "class=\"highlight\"" in "_site/index.html" And I should see "class=\"highlight\"" in "_site/index.html"
@ -122,7 +128,8 @@ Feature: Site configuration
| entry1 | 2007-12-31 | post | content for entry1. | | entry1 | 2007-12-31 | post | content for entry1. |
| entry2 | 2020-01-31 | post | content for entry2. | | entry2 | 2020-01-31 | post | content for entry2. |
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Page Layout: 1 on 2010-01-01" in "_site/index.html" And I should see "Page Layout: 1 on 2010-01-01" in "_site/index.html"
And I should see "Post Layout: <p>content for entry1.</p>" in "_site/2007/12/31/entry1.html" And I should see "Post Layout: <p>content for entry1.</p>" in "_site/2007/12/31/entry1.html"
And the "_site/2020/01/31/entry2.html" file should not exist And the "_site/2020/01/31/entry2.html" file should not exist
@ -142,7 +149,8 @@ Feature: Site configuration
| entry1 | 2007-12-31 | post | content for entry1. | | entry1 | 2007-12-31 | post | content for entry1. |
| entry2 | 2020-01-31 | post | content for entry2. | | entry2 | 2020-01-31 | post | content for entry2. |
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Page Layout: 2 on 2010-01-01" in "_site/index.html" And I should see "Page Layout: 2 on 2010-01-01" in "_site/index.html"
And I should see "Post Layout: <p>content for entry1.</p>" in "_site/2007/12/31/entry1.html" And I should see "Post Layout: <p>content for entry1.</p>" in "_site/2007/12/31/entry1.html"
And I should see "Post Layout: <p>content for entry2.</p>" in "_site/2020/01/31/entry2.html" And I should see "Post Layout: <p>content for entry2.</p>" in "_site/2020/01/31/entry2.html"
@ -161,7 +169,8 @@ Feature: Site configuration
| entry1 | 2013-04-09 23:22 -0400 | post | content for entry1. | | entry1 | 2013-04-09 23:22 -0400 | post | content for entry1. |
| entry2 | 2013-04-10 03:14 -0400 | post | content for entry2. | | entry2 | 2013-04-10 03:14 -0400 | post | content for entry2. |
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Page Layout: 2" in "_site/index.html" And I should see "Page Layout: 2" in "_site/index.html"
And I should see "Post Layout: <p>content for entry1.</p>\n built at 2013-04-09T23:22:00-04:00" in "_site/2013/04/09/entry1.html" And I should see "Post Layout: <p>content for entry1.</p>\n built at 2013-04-09T23:22:00-04:00" in "_site/2013/04/09/entry1.html"
And I should see "Post Layout: <p>content for entry2.</p>\n built at 2013-04-10T03:14:00-04:00" in "_site/2013/04/10/entry2.html" And I should see "Post Layout: <p>content for entry2.</p>\n built at 2013-04-10T03:14:00-04:00" in "_site/2013/04/10/entry2.html"
@ -180,7 +189,8 @@ Feature: Site configuration
| entry1 | 2013-04-09 23:22 +0400 | post | content for entry1. | | entry1 | 2013-04-09 23:22 +0400 | post | content for entry1. |
| entry2 | 2013-04-10 03:14 +0400 | post | content for entry2. | | entry2 | 2013-04-10 03:14 +0400 | post | content for entry2. |
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Page Layout: 2" in "_site/index.html" And I should see "Page Layout: 2" in "_site/index.html"
And the "_site/2013/04/09/entry1.html" file should exist And the "_site/2013/04/09/entry1.html" file should exist
And the "_site/2013/04/09/entry2.html" file should exist And the "_site/2013/04/09/entry2.html" file should exist
@ -198,7 +208,8 @@ Feature: Site configuration
| Oranges | 2009-04-01 | An article about oranges | | Oranges | 2009-04-01 | An article about oranges |
| Bananas | 2009-04-05 | An article about bananas | | Bananas | 2009-04-05 | An article about bananas |
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And the "_site/2009/04/05/bananas.html" file should exist And the "_site/2009/04/05/bananas.html" file should exist
And the "_site/2009/04/01/oranges.html" file should exist And the "_site/2009/04/01/oranges.html" file should exist
And the "_site/2009/03/27/apples.html" file should not exist And the "_site/2009/03/27/apples.html" file should not exist
@ -211,7 +222,8 @@ Feature: Site configuration
| .gitignore | | .gitignore |
| .foo | | .foo |
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see ".DS_Store" in "_site/.gitignore" And I should see ".DS_Store" in "_site/.gitignore"
And the "_site/.htaccess" file should not exist And the "_site/.htaccess" file should not exist
@ -231,7 +243,8 @@ Feature: Site configuration
| entry1 | 2007-12-31 | post | content for entry1. | | entry1 | 2007-12-31 | post | content for entry1. |
| entry2 | 2020-01-31 | post | content for entry2. | | entry2 | 2020-01-31 | post | content for entry2. |
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Page Layout: 2 on 2010-01-01" in "_site/index.html" And I should see "Page Layout: 2 on 2010-01-01" in "_site/index.html"
And I should see "Post Layout: <p>content for entry1.</p>" in "_site/2007/12/31/entry1.html" And I should see "Post Layout: <p>content for entry1.</p>" in "_site/2007/12/31/entry1.html"
And I should see "Post Layout: <p>content for entry2.</p>" in "_site/2020/01/31/entry2.html" And I should see "Post Layout: <p>content for entry2.</p>" in "_site/2020/01/31/entry2.html"
@ -240,6 +253,7 @@ Feature: Site configuration
Given I have an "index.html" page with layout "page" that contains "FOO" Given I have an "index.html" page with layout "page" that contains "FOO"
And I have a "_config.yml" file that contains "layouts: '../../../../../../../../../../../../../../usr/include'" And I have a "_config.yml" file that contains "layouts: '../../../../../../../../../../../../../../usr/include'"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "FOO" in "_site/index.html" And I should see "FOO" in "_site/index.html"
And I should not see " " in "_site/index.html" And I should not see " " in "_site/index.html"

View File

@ -6,14 +6,16 @@ Feature: Site data
Scenario: Use page variable in a page Scenario: Use page variable in a page
Given I have an "contact.html" page with title "Contact" that contains "{{ page.title }}: email@example.com" Given I have an "contact.html" page with title "Contact" that contains "{{ page.title }}: email@example.com"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Contact: email@example.com" in "_site/contact.html" And I should see "Contact: email@example.com" in "_site/contact.html"
Scenario Outline: Use page.path variable in a page Scenario Outline: Use page.path variable in a page
Given I have a <dir> directory Given I have a <dir> directory
And I have a "<path>" page that contains "Source path: {{ page.path }}" And I have a "<path>" page that contains "Source path: {{ page.path }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Source path: <path>" in "_site/<path>" And I should see "Source path: <path>" in "_site/<path>"
Examples: Examples:
@ -25,13 +27,15 @@ Feature: Site data
Scenario: Override page.path Scenario: Override page.path
Given I have an "override.html" page with path "custom-override.html" that contains "Custom path: {{ page.path }}" Given I have an "override.html" page with path "custom-override.html" that contains "Custom path: {{ page.path }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Custom path: custom-override.html" in "_site/override.html" And I should see "Custom path: custom-override.html" in "_site/override.html"
Scenario: Use site.time variable Scenario: Use site.time variable
Given I have an "index.html" page that contains "{{ site.time }}" Given I have an "index.html" page that contains "{{ site.time }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see today's time in "_site/index.html" And I should see today's time in "_site/index.html"
Scenario: Use site.posts variable for latest post Scenario: Use site.posts variable for latest post
@ -43,7 +47,8 @@ Feature: Site data
| Second Post | 2009-03-26 | My Second Post | | Second Post | 2009-03-26 | My Second Post |
| Third Post | 2009-03-27 | My Third Post | | Third Post | 2009-03-27 | My Third Post |
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Third Post: /2009/03/27/third-post.html" in "_site/index.html" And I should see "Third Post: /2009/03/27/third-post.html" in "_site/index.html"
Scenario: Use site.posts variable in a loop Scenario: Use site.posts variable in a loop
@ -55,7 +60,8 @@ Feature: Site data
| Second Post | 2009-03-26 | My Second Post | | Second Post | 2009-03-26 | My Second Post |
| Third Post | 2009-03-27 | My Third Post | | Third Post | 2009-03-27 | My Third Post |
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Third Post Second Post First Post" in "_site/index.html" And I should see "Third Post Second Post First Post" in "_site/index.html"
Scenario: Use site.categories.code variable Scenario: Use site.categories.code variable
@ -66,7 +72,8 @@ Feature: Site data
| Awesome Hack | 2009-03-26 | code | puts 'Hello World' | | Awesome Hack | 2009-03-26 | code | puts 'Hello World' |
| Delicious Beer | 2009-03-26 | food | 1) Yuengling | | Delicious Beer | 2009-03-26 | food | 1) Yuengling |
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Awesome Hack" in "_site/index.html" And I should see "Awesome Hack" in "_site/index.html"
Scenario: Use site.tags variable Scenario: Use site.tags variable
@ -76,7 +83,8 @@ Feature: Site data
| title | date | tag | content | | title | date | tag | content |
| Delicious Beer | 2009-03-26 | beer | 1) Yuengling | | Delicious Beer | 2009-03-26 | beer | 1) Yuengling |
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "Yuengling" in "_site/index.html" And I should see "Yuengling" in "_site/index.html"
Scenario: Order Posts by name when on the same date Scenario: Order Posts by name when on the same date
@ -90,18 +98,21 @@ Feature: Site data
| C | 2009-03-26 | C | | C | 2009-03-26 | C |
| last | 2009-04-26 | last | | last | 2009-04-26 | last |
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "last:C, C:B,last B:A,C A:first,B first:,A" in "_site/index.html" And I should see "last:C, C:B,last B:A,C A:first,B first:,A" in "_site/index.html"
Scenario: Use configuration date in site payload Scenario: Use configuration date in site payload
Given I have an "index.html" page that contains "{{ site.url }}" Given I have an "index.html" page that contains "{{ site.url }}"
And I have a configuration file with "url" set to "http://example.com" And I have a configuration file with "url" set to "http://example.com"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "http://example.com" in "_site/index.html" And I should see "http://example.com" in "_site/index.html"
Scenario: Access Jekyll version via jekyll.version Scenario: Access Jekyll version via jekyll.version
Given I have an "index.html" page that contains "{{ jekyll.version }}" Given I have an "index.html" page that contains "{{ jekyll.version }}"
When I run jekyll build When I run jekyll build
Then the _site directory should exist Then I should get a zero exit status
And the _site directory should exist
And I should see "\d+\.\d+\.\d+" in "_site/index.html" And I should see "\d+\.\d+\.\d+" in "_site/index.html"