diff --git a/features/collections.feature b/features/collections.feature index 1fcc7cce..888bd1c2 100644 --- a/features/collections.feature +++ b/features/collections.feature @@ -8,7 +8,8 @@ Feature: Collections And I have fixture collections And I have a configuration file with "collections" set to "['methods']" 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:
Use Jekyll.configuration
to build a full configuration for use w/Jekyll.
Whatever: foo.bar
\nSigns are nice
\nJekyll.sanitized_path
is used to make sure your path is in your source.
Run your generators! default
\nPage without title.
\nRun your generators! default
" in "_site/index.html" And the "_site/methods/configuration.html" file should not exist @@ -24,7 +25,8 @@ Feature: Collections foo: bar """ 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 "label => methods" in "_site/index.html" And I should see "Methods metadata: bar" in "_site/collection_metadata.html" @@ -41,7 +43,8 @@ Feature: Collections permalink: /:collection/:path/ """ 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: foo.bar
" in "_site/methods/configuration/index.html" Scenario: Rendered document in a layout @@ -56,7 +59,8 @@ Feature: Collections foo: bar """ 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 "label => methods" in "_site/index.html" And I should see "foo => bar" in "_site/index.html" @@ -72,7 +76,8 @@ Feature: Collections - methods """ 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" Scenario: Collections specified as an hash @@ -84,7 +89,8 @@ Feature: Collections - methods """ 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" Scenario: All the documents @@ -96,7 +102,8 @@ Feature: Collections - methods """ 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" Scenario: Documents have an output attribute, which is the converted HTML @@ -108,7 +115,8 @@ Feature: Collections - methods """ 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:Use Jekyll.configuration
to build a full configuration for use w/Jekyll.
Whatever: foo.bar
" in "_site/index.html" Scenario: Filter documents by where @@ -120,7 +128,8 @@ Feature: Collections - methods """ 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" Scenario: Sort by title @@ -132,7 +141,8 @@ Feature: Collections - methods """ 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:Page without title.
" in "_site/index.html" Scenario: Sort by relative_path @@ -144,5 +154,6 @@ Feature: Collections - methods """ 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" diff --git a/features/create_sites.feature b/features/create_sites.feature index 898115c2..031fa434 100644 --- a/features/create_sites.feature +++ b/features/create_sites.feature @@ -13,7 +13,8 @@ Feature: Create sites Scenario: Basic site Given I have an "index.html" file that contains "Basic Site" 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" Scenario: Basic site with a post @@ -22,7 +23,8 @@ Feature: Create sites | title | date | content | | Hackers | 2009-03-27 | My First Exploit | 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" 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 a default layout that contains "Page Layout: {{ content }}" 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" 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. | And I have a default layout that contains "Post Layout: {{ content }}" 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:The only winning move is not to play.
" in "_site/2009/03/27/wargames.html" 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. | And I have a post/simple layout that contains "Post Layout: {{ content }}" 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:The only winning move is not to play.
" in "_site/2009/03/27/wargames.html" Scenario: Basic site with layouts, pages, posts and files @@ -75,7 +80,8 @@ Feature: Create sites | entry3 | 2009-05-27 | post | content for entry3. | | entry4 | 2009-06-27 | post | content for entry4. | 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 "No replacement \{\{ site.posts.size \}\}" in "_site/about.html" 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 "_includes/about.textile" file that contains "Generated by Jekyll" 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" 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/index.html" page that contains "Basic Site with subdir include tag: {% include about.textile %}" 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" 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 "index.html" page that contains "Basic Site with include tag: {% include about.textile %}" 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" Scenario: Basic site with internal post linking @@ -120,19 +129,22 @@ Feature: Create sites | entry1 | 2007-12-31 | post | content for entry1. | | entry2 | 2008-01-01 | post | content for entry2. | 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" Scenario: Basic site with whitelisted dotfile Given I have an ".htaccess" file that contains "SomeDirective" 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" Scenario: File was replaced by a directory Given I have a "test" file that contains "some stuff" 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" Given I have a test directory 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" 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/public.html" file should exist But the "_site/secret.html" file should not exist 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/public.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. | | entry2 | 2007-12-31 | post | content for entry2. | 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 the "_site/2020/12/31/entry1.html" file should not exist 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 diff --git a/features/drafts.feature b/features/drafts.feature index 5d7982ec..5a7f49f3 100644 --- a/features/drafts.feature +++ b/features/drafts.feature @@ -10,7 +10,8 @@ Feature: Draft Posts | title | date | layout | content | | Recipe | 2009-03-27 | default | Not baked yet. | 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" Scenario: Don't preview a draft @@ -21,7 +22,8 @@ Feature: Draft Posts | title | date | layout | content | | Recipe | 2009-03-27 | default | Not baked yet. | 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 Scenario: Don't preview a draft that is not published @@ -32,7 +34,8 @@ Feature: Draft Posts | title | date | layout | published | content | | Recipe | 2009-03-27 | default | false | Not baked yet. | 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 Scenario: Use page.path variable @@ -42,5 +45,6 @@ Feature: Draft Posts | title | date | layout | content | | Recipe | 2009-03-27 | simple | Post path: {{ page.path }} | 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" diff --git a/features/embed_filters.feature b/features/embed_filters.feature index d6f99fc7..0f2d0ada 100644 --- a/features/embed_filters.feature +++ b/features/embed_filters.feature @@ -11,7 +11,8 @@ Feature: Embed filters | 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 }}" 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" 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. | And I have a default layout that contains "{{ page.title | xml_escape }}" 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 & Wars" in "_site/2009/03/27/star-wars.html" 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. | And I have a default layout that contains "{{ content | number_of_words }}" 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" 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. | And I have a default layout that contains "{{ page.tags | array_to_sentence_string }}" 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" 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. | And I have a default layout that contains "By {{ '_Obi-wan_' | markdownify }}" 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 "ByObi-wan
" in "_site/2009/03/27/star-wars.html" Scenario: Sort by an arbitrary variable @@ -68,7 +73,8 @@ Feature: Embed filters | Page-2 | default | 6 | Something | And I have a default layout that contains "{{ site.pages | sort:'value' | map:'title' | join:', ' }}" 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-2.html" @@ -85,7 +91,8 @@ Feature: Embed filters | 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 %}" 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" Scenario: Sort pages by the title ordering pages without title last @@ -101,5 +108,6 @@ Feature: Embed filters | 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 %}" 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" diff --git a/features/frontmatter_defaults.feature b/features/frontmatter_defaults.feature index a9a64ae2..31aee377 100644 --- a/features/frontmatter_defaults.feature +++ b/features/frontmatter_defaults.feature @@ -12,7 +12,8 @@ Feature: frontmatter defaults And I have a configuration file with "defaults" set to "[{scope: {path: ""}, values: {layout: "pretty"}}]" 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:just some post
" in "_site/2013/09/11/default-layout.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 a configuration file with "defaults" set to "[{scope: {path: ""}, values: {custom: "some special data", author: "Ben"}}]" 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 "some special data
\ninfo on the webpage
" in "_site/2013/10/14/about.html" And I should see "subfolder:info on the special section
" in "_site/special/2013/10/14/about.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"}}]" 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:content of site/2013/10/14/about.html
" in "_site/2013/10/14/about.html" And I should see "main:content of site/special/2013/10/14/about1.html
" in "_site/special/2013/10/14/about1.html" And I should see "main:content of site/special/2013/10/14/about2.html
" in "_site/special/2013/10/14/about2.html" @@ -132,7 +136,8 @@ Feature: frontmatter defaults myval: "Test" """ 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" Scenario: Override frontmatter defaults inside a collection @@ -159,7 +164,8 @@ Feature: frontmatter defaults myval: "Test" """ 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" Scenario: Deep merge frontmatter defaults diff --git a/features/hooks.feature b/features/hooks.feature index 5252d562..48b2884e 100644 --- a/features/hooks.feature +++ b/features/hooks.feature @@ -24,7 +24,8 @@ Feature: Hooks end """ 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" Scenario: Modify the payload before rendering the site @@ -37,7 +38,8 @@ Feature: Hooks end """ 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" Scenario: Modify the site contents after reading @@ -51,7 +53,8 @@ Feature: Hooks end """ 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 I should see "page2" in "_site/page2.html" @@ -67,7 +70,8 @@ Feature: Hooks """ And I have a "page1.html" page that contains "page1" 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" 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" 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" Scenario: Alter the payload for one page but not another @@ -138,7 +143,8 @@ Feature: Hooks | title | date | layout | content | | entry1 | 2015-03-14 | nil | {{ page.harold }} | 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" Scenario: Alter the payload for certain posts @@ -268,7 +274,8 @@ Feature: Hooks {{ site.memes.first.text }} """ 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" Scenario: Update a document after rendering it, but before writing it to disk @@ -294,7 +301,8 @@ Feature: Hooks {{ page.text }} """ 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/memes/doc1.html"
Scenario: Perform an action after every document is written
@@ -322,5 +330,6 @@ Feature: Hooks
{{ page.text }}
"""
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"
diff --git a/features/include_tag.feature b/features/include_tag.feature
index 83ae379f..c8ebf717 100644
--- a/features/include_tag.feature
+++ b/features/include_tag.feature
@@ -19,7 +19,8 @@ Feature: Include tags
| 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 %} |
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 "
The only winning move is not to play.
" in "_site/2009/03/27/wargames.html" 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:The only winning move is not to play.
" in "_site/2009/03/27/wargames.html" Scenario: Generate a metadata file @@ -25,12 +27,14 @@ Feature: Incremental rebuild Scenario: Rebuild when content is changed Given I have an "index.html" file that contains "Basic Site" 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" When I wait 1 second Then I have an "index.html" file that contains "Bacon Site" 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" 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 a default layout that contains "Page Layout: {{ content }}" 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" When I wait 1 second Then I have a default layout that contains "Page Layout Changed: {{ content }}" 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" 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 "_includes/about.textile" file that contains "Generated by Jekyll" 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" When I wait 1 second Then I have an "_includes/about.textile" file that contains "Regenerated by Jekyll" 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" diff --git a/features/markdown.feature b/features/markdown.feature index c0eeb25d..3649a6d1 100644 --- a/features/markdown.feature +++ b/features/markdown.feature @@ -11,7 +11,8 @@ Feature: Markdown | title | date | content | type | | Hackers | 2009-03-27 | # My Title | markdown | 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 "Luke, I am your father.
" in "_site/2009/03/27/star-wars.html" 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. | And I have a simple layout that contains "Post category: {{ page.categories }}" 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" 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. | And I have a simple layout that contains "Post category: {{ page.categories }}" 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" 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. | And I have a simple layout that contains "Post category: {{ page.categories }}" 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" 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. | And I have a simple layout that contains "Post category: {{ page.categories }}" 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" Scenario: Use post.tags variable @@ -114,7 +123,8 @@ Feature: Post data | Star Wars | 2009-05-18 | simple | twist | Luke, I am your father. | And I have a simple layout that contains "Post tags: {{ page.tags }}" 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" 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. | And I have a simple layout that contains "Post categories: {{ page.categories | array_to_sentence_string }}" 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" 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. | And I have a simple layout that contains "Post categories: {{ page.categories | array_to_sentence_string }}" 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" 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. | And I have a simple layout that contains "Post category: {{ page.categories }}" 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" 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. | And I have a simple layout that contains "Post category: {{ page.categories }}" 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" 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. | And I have a simple layout that contains "Post categories: {{ page.categories | array_to_sentence_string }}" 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" 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. | And I have a simple layout that contains "Post category: {{ page.categories }}" 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" 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 simple layout that contains "Post category: {{ page.categories }}" 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" 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 simple layout that contains "Post category: {{ page.categories }}" 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" 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. | And I have a simple layout that contains "Post categories: {{ page.categories | array_to_sentence_string }}" 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/2013/03/17/star-trek.html" @@ -224,7 +243,8 @@ Feature: Post data | title | type | date | content | | my-post | html | 2013-04-12 | Source path: {{ page.path }} | 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:content for entry1.
" in "_site/index.html" Scenario: An excerpt from a post with a layout @@ -24,7 +25,8 @@ Feature: Post excerpts | title | date | layout | content | | entry1 | 2007-12-31 | post | content for entry1. | 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/12 directory should exist And the _site/2007/12/31 directory should exist @@ -41,7 +43,8 @@ Feature: Post excerpts | title | date | layout | content | | entry1 | 2007-12-31 | post | content for entry1. | 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/12 directory should exist And the _site/2007/12/31 directory should exist diff --git a/features/rendering.feature b/features/rendering.feature index 01507cb0..5031ef06 100644 --- a/features/rendering.feature +++ b/features/rendering.feature @@ -16,7 +16,8 @@ Feature: Rendering 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!" 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" 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 simple layout that contains "{{ content }}Ahoy, indeed!" 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.js" @@ -33,18 +35,21 @@ Feature: Rendering 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" 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" 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}}'" 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 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}}'" And I have a configuration file with "gems" set to "[jekyll-coffeescript]" 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" diff --git a/features/site_configuration.feature b/features/site_configuration.feature index 379cea4f..5c495356 100644 --- a/features/site_configuration.feature +++ b/features/site_configuration.feature @@ -8,7 +8,8 @@ Feature: Site configuration And I have an "_sourcedir/index.html" file that contains "Changing source directory" And I have a configuration file with "source" set to "_sourcedir" 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" Scenario: Change destination directory @@ -66,27 +67,31 @@ Feature: Site configuration Given I have an "index.markdown" page that contains "[Google](http://google.com)" And I have a configuration file with "markdown" set to "rdiscount" 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 "Google" in "_site/index.html" Scenario: Use Kramdown for markup Given I have an "index.markdown" page that contains "[Google](http://google.com)" And I have a configuration file with "markdown" set to "kramdown" 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 "Google" in "_site/index.html" Scenario: Use Redcarpet for markup Given I have an "index.markdown" page that contains "[Google](http://google.com)" And I have a configuration file with "markdown" set to "redcarpet" 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 "Google" in "_site/index.html" Scenario: Highlight code with pygments Given I have an "index.html" page that contains "{% highlight ruby %} puts 'Hello world!' {% endhighlight %}" 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 "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 %}" And I have a configuration file with "highlighter" set to "rouge" 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 "class=\"highlight\"" in "_site/index.html" @@ -122,7 +128,8 @@ Feature: Site configuration | entry1 | 2007-12-31 | post | content for entry1. | | entry2 | 2020-01-31 | post | content for entry2. | 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 "Post Layout:content for entry1.
" in "_site/2007/12/31/entry1.html" 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. | | entry2 | 2020-01-31 | post | content for entry2. | 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 "Post Layout:content for entry1.
" in "_site/2007/12/31/entry1.html" And I should see "Post Layout:content for entry2.
" 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. | | entry2 | 2013-04-10 03:14 -0400 | post | content for entry2. | 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 "Post Layout:content for entry1.
\n built at 2013-04-09T23:22:00-04:00" in "_site/2013/04/09/entry1.html" And I should see "Post Layout:content for entry2.
\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. | | entry2 | 2013-04-10 03:14 +0400 | post | content for entry2. | 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 the "_site/2013/04/09/entry1.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 | | Bananas | 2009-04-05 | An article about bananas | 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/01/oranges.html" file should exist And the "_site/2009/03/27/apples.html" file should not exist @@ -211,7 +222,8 @@ Feature: Site configuration | .gitignore | | .foo | 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 the "_site/.htaccess" file should not exist @@ -231,7 +243,8 @@ Feature: Site configuration | entry1 | 2007-12-31 | post | content for entry1. | | entry2 | 2020-01-31 | post | content for entry2. | 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 "Post Layout:content for entry1.
" in "_site/2007/12/31/entry1.html" And I should see "Post Layout:content for entry2.
" 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" And I have a "_config.yml" file that contains "layouts: '../../../../../../../../../../../../../../usr/include'" 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 not see " " in "_site/index.html" diff --git a/features/site_data.feature b/features/site_data.feature index a7fadf34..e3c99a64 100644 --- a/features/site_data.feature +++ b/features/site_data.feature @@ -6,14 +6,16 @@ Feature: Site data Scenario: Use page variable in a page Given I have an "contact.html" page with title "Contact" that contains "{{ page.title }}: email@example.com" 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" Scenario Outline: Use page.path variable in a page Given I have a