diff --git a/features/collections.feature b/features/collections.feature index 451c84d8..6ff41080 100644 --- a/features/collections.feature +++ b/features/collections.feature @@ -7,7 +7,7 @@ Feature: Collections Given I have an "index.html" page that contains "Collections: {{ site.methods }}" And I have fixture collections And I have a configuration file with "collections" set to "['methods']" - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "Collections: Use `{{ page.title }}` to build a full configuration for use w/Jekyll.\n\nWhatever: {{ page.whatever }}\n`{{ page.title }}` is used to make sure your path is in your source.\nRun your generators! {{ page.layout }}\nCreate dat site.\nRun your generators! {{ page.layout }}" in "_site/index.html" @@ -18,7 +18,7 @@ Feature: Collections | key | value | | collections | ['methods'] | | render | ['methods'] | - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "Collections: methods" in "_site/index.html" And I should see "

Whatever: foo.bar

" in "_site/methods/configuration.html" @@ -31,7 +31,7 @@ Feature: Collections | key | value | | collections | ['methods'] | | render | ['methods'] | - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "Collections: methods" in "_site/index.html" And I should see "

Run your generators! default

" in "_site/methods/site/generate.html" diff --git a/features/create_sites.feature b/features/create_sites.feature index c84d90f8..18996bfe 100644 --- a/features/create_sites.feature +++ b/features/create_sites.feature @@ -5,14 +5,14 @@ Feature: Create sites Scenario: Blank site Given I do not have a "test_blank" directory - When I call jekyll new with test_blank --blank + When I run jekyll new test_blank --blank Then the test_blank/_layouts directory should exist And the test_blank/_posts directory should exist And the "test_blank/index.html" file should exist Scenario: Basic site Given I have an "index.html" file that contains "Basic Site" - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "Basic Site" in "_site/index.html" @@ -21,7 +21,7 @@ Feature: Create sites And I have the following post: | title | date | content | | Hackers | 2009-03-27 | My First Exploit | - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "My First Exploit" in "_site/2009/03/27/hackers.html" @@ -29,7 +29,7 @@ Feature: Create sites Given I have a _layouts directory 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 + When I run jekyll build Then the _site directory should exist And I should see "Page Layout: Basic Site with Layout" in "_site/index.html" @@ -40,7 +40,7 @@ Feature: Create sites | title | date | layout | content | | 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 + When I run jekyll build Then 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" @@ -51,7 +51,7 @@ Feature: Create sites | title | date | layout | content | | 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 + When I run jekyll build Then 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" @@ -74,7 +74,7 @@ Feature: Create sites | title | date | layout | content | | entry3 | 2009-05-27 | post | content for entry3. | | entry4 | 2009-06-27 | post | content for entry4. | - When I run jekyll + When I run jekyll build Then 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" @@ -89,7 +89,7 @@ Feature: Create sites Given I have a _includes directory 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 + When I run jekyll build Then the _site directory should exist And I should see "Basic Site with include tag: Generated by Jekyll" in "_site/index.html" @@ -98,7 +98,7 @@ Feature: Create sites And I have an "_includes/about.textile" file that contains "Generated by Jekyll" 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 + When I run jekyll build Then the _site directory should exist And I should see "Basic Site with subdir include tag: Generated by Jekyll" in "_site/info/index.html" @@ -107,7 +107,7 @@ Feature: Create sites And I have an "_includes/about.textile" file that contains "Generated by {% include jekyll.textile %}" 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 + When I run jekyll build Then the _site directory should exist And I should see "Basic Site with include tag: Generated by Jekyll" in "_site/index.html" @@ -119,24 +119,24 @@ Feature: Create sites | title | date | layout | content | | entry1 | 2007-12-31 | post | content for entry1. | | entry2 | 2020-01-31 | post | content for entry2. | - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "URL: /2020/01/31/entry2/" in "_site/index.html" Scenario: Basic site with whitelisted dotfile Given I have an ".htaccess" file that contains "SomeDirective" - When I run jekyll + When I run jekyll build Then 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 + When I run jekyll build Then 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" - When I run jekyll + When I run jekyll build Then the _site/test directory should exist And I should see "some other stuff" in "_site/test/index.html" @@ -145,13 +145,13 @@ Feature: Create sites And I have a "public.html" page with published "true" that contains "Explicitly published page" And I have a "secret.html" page with published "false" that contains "Unpublished page" - When I run jekyll + When I run jekyll build Then 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 with "--unpublished" + When I run jekyll build --unpublished Then the _site directory should exist And the "_site/index.html" file should exist And the "_site/public.html" file should exist diff --git a/features/data.feature b/features/data.feature index 33adfaad..9bfac1ee 100644 --- a/features/data.feature +++ b/features/data.feature @@ -13,7 +13,7 @@ Feature: Data price: 2.5 """ And I have an "index.html" page that contains "{% for product in site.data.products %}{{product.name}}{% endfor %}" - When I run jekyll + When I run jekyll build Then the "_site/index.html" file should exist And I should see "sugar" in "_site/index.html" And I should see "salt" in "_site/index.html" @@ -28,7 +28,7 @@ Feature: Data age: 34 """ And I have an "index.html" page that contains "{% for member in site.data.members %}{{member.name}}{% endfor %}" - When I run jekyll + When I run jekyll build Then the "_site/index.html" file should exist And I should see "Jack" in "_site/index.html" And I should see "Leon" in "_site/index.html" @@ -43,7 +43,7 @@ Feature: Data age: 34 """ And I have an "index.html" page that contains "{% for member in site.data.team_members %}{{member.name}}{% endfor %}" - When I run jekyll + When I run jekyll build Then the "_site/index.html" file should exist And I should see "Jack" in "_site/index.html" And I should see "Leon" in "_site/index.html" @@ -58,7 +58,7 @@ Feature: Data age: 34 """ And I have an "index.html" page that contains "{% for member in site.data %}{{member.name}}{% endfor %}" - When I run jekyll + When I run jekyll build Then the "_site/index.html" file should exist And I should see "Jack" in "_site/index.html" And I should see "Leon" in "_site/index.html" diff --git a/features/drafts.feature b/features/drafts.feature index 2c819658..c55edbb9 100644 --- a/features/drafts.feature +++ b/features/drafts.feature @@ -9,7 +9,7 @@ Feature: Draft Posts And I have the following draft: | title | date | layout | content | | Recipe | 2009-03-27 | default | Not baked yet. | - When I run jekyll with drafts + When I run jekyll build --drafts Then the _site directory should exist And I should see "Not baked yet." in "_site/recipe.html" @@ -20,7 +20,7 @@ Feature: Draft Posts And I have the following draft: | title | date | layout | content | | Recipe | 2009-03-27 | default | Not baked yet. | - When I run jekyll + When I run jekyll build Then the _site directory should exist And the "_site/recipe.html" file should not exist @@ -31,7 +31,7 @@ Feature: Draft Posts And I have the following draft: | title | date | layout | published | content | | Recipe | 2009-03-27 | default | false | Not baked yet. | - When I run jekyll with drafts + When I run jekyll build --drafts Then the _site directory should exist And the "_site/recipe.html" file should not exist @@ -41,6 +41,6 @@ Feature: Draft Posts And I have the following draft: | title | date | layout | content | | Recipe | 2009-03-27 | simple | Post path: {{ page.path }} | - When I run jekyll with drafts + When I run jekyll build --drafts Then the _site directory should exist And I should see "Post path: _drafts/recipe.textile" in "_site/recipe.html" diff --git a/features/embed_filters.feature b/features/embed_filters.feature index ebe7262f..27f5f1df 100644 --- a/features/embed_filters.feature +++ b/features/embed_filters.feature @@ -10,7 +10,7 @@ Feature: Embed filters | title | date | layout | content | | 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 + When I run jekyll build Then the _site directory should exist And I should see today's date in "_site/2009/03/27/star-wars.html" @@ -23,7 +23,7 @@ Feature: Embed filters And I have a default layout that contains "{{ page.title | xml_escape }}" - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "Star & Wars" in "_site/2009/03/27/star-wars.html" @@ -34,7 +34,7 @@ Feature: Embed filters | title | date | layout | content | | Star Wars | 2009-03-27 | default | These aren't the droids you're looking for. | And I have a default layout that contains "{{ content | xml_escape }}" - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "7" in "_site/2009/03/27/star-wars.html" @@ -45,7 +45,7 @@ Feature: Embed filters | title | date | layout | tags | content | | 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 + When I run jekyll build Then the _site directory should exist And I should see "scifi, movies, and force" in "_site/2009/03/27/star-wars.html" @@ -56,7 +56,7 @@ Feature: Embed filters | title | date | layout | content | | 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_' | textilize }}" - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "By

Obi-wan

" in "_site/2009/03/27/star-wars.html" @@ -69,7 +69,7 @@ Feature: Embed filters | title | layout | value | content | | Page-2 | default | 6 | Something | And I have a default layout that contains "{{ site.pages | sort:'value' | map:'title' | join:', ' }}" - When I run jekyll + When I run jekyll build Then 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" diff --git a/features/frontmatter_defaults.feature b/features/frontmatter_defaults.feature index fa9e0a4d..3f2d3cd5 100644 --- a/features/frontmatter_defaults.feature +++ b/features/frontmatter_defaults.feature @@ -11,7 +11,7 @@ Feature: frontmatter defaults And I have a configuration file with "defaults" set to "[{scope: {path: ""}, values: {layout: "pretty"}}]" - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "THIS IS THE LAYOUT:

just some post

" in "_site/2013/09/11/default-layout.html" And I should see "THIS IS THE LAYOUT: just some page" in "_site/index.html" @@ -23,7 +23,7 @@ Feature: frontmatter defaults | default data | 2013-09-11 |

{{page.custom}}

{{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"}}]" - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "

some special data

Ben
" in "_site/2013/09/11/default-data.html" And I should see "just some special data by Ben" in "_site/index.html" @@ -47,7 +47,7 @@ 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"}}]" - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "root:

info 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" @@ -61,7 +61,7 @@ Feature: frontmatter defaults | this is a post | 2013-10-14 | blabla | And I have an "index.html" page that contains "interesting stuff" And I have a configuration file with "defaults" set to "[{scope: {path: "", type: "post"}, values: {permalink: "/post.html"}}, {scope: {path: "", type: "page"}, values: {permalink: "/page.html"}}, {scope: {path: ""}, values: {permalink: "/perma.html"}}]" - When I run jekyll + When I run jekyll build Then I should see "blabla" in "_site/post.html" And I should see "interesting stuff" in "_site/page.html" But the "_site/perma.html" file should not exist @@ -73,7 +73,7 @@ Feature: frontmatter defaults | override | 2013-10-14 | /frontmatter.html | some guy | a blog by {{page.author}} | And I have an "index.html" page with permalink "override.html" that contains "nothing" And I have a configuration file with "defaults" set to "[{scope: {path: ""}, values: {permalink: "/perma.html", author: "Chris"}}]" - When I run jekyll + When I run jekyll build Then I should see "a blog by some guy" in "_site/frontmatter.html" And I should see "nothing" in "_site/override.html" But the "_site/perma.html" file should not exist diff --git a/features/include_tag.feature b/features/include_tag.feature index bef09e3f..3d2f48c2 100644 --- a/features/include_tag.feature +++ b/features/include_tag.feature @@ -18,7 +18,7 @@ Feature: Include tags | Allow params with spaces and quotes | 2013-04-07 | default | {% include params.html cool="param with spaces" super="\"quoted\"" single='has "quotes"' escaped='\'single\' quotes' %} | | Parameter syntax | 2013-04-12 | default | {% include params.html param1_or_2="value" %} | | Pass a variable | 2013-06-22 | default | {% assign var = 'some text' %}{% include params.html local=var layout=page.layout %} | - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "
My awesome blog header: myparam
" in "_site/2013/03/21/include-files.html" And I should not see "myparam" in "_site/2013/03/21/ignore-params-if-unused.html" @@ -43,7 +43,7 @@ Feature: Include tags | include_file1 | snippet.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' %}" - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "a snippet that works with parameters" in "_site/index.html" @@ -52,7 +52,7 @@ Feature: Include tags And I have an "_includes/one.html" file that contains "one" 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 %}" - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "one two" in "_site/index.html" @@ -63,6 +63,6 @@ Feature: Include tags | key | value | | include_file | one | And I have an "index.html" page that contains "{% include {{ site.include_file | append: '.html' }} %}" - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "one included" in "_site/index.html" diff --git a/features/markdown.feature b/features/markdown.feature index b864e211..f17d94a7 100644 --- a/features/markdown.feature +++ b/features/markdown.feature @@ -10,7 +10,7 @@ Feature: Markdown And I have the following post: | title | date | content | type | | Hackers | 2009-03-27 | # My Title | markdown | - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "Index" in "_site/index.html" And I should see "

My Title

" in "_site/2009/03/27/hackers.html" @@ -23,7 +23,7 @@ Feature: Markdown And I have the following post: | title | date | content | type | | Hackers | 2009-03-27 | # My Title | markdown | - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "Index" in "_site/index.html" And I should see "

My Title

" in "_site/index.html" @@ -42,7 +42,7 @@ Feature: Markdown My awesome code ``` """ - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "My awesome code" in "_site/index.html" And I should see "
\nMy awesome code\n
" in "_site/index.html" @@ -61,7 +61,7 @@ Feature: Markdown puts "My awesome string" ``` """ - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "My awesome string" in "_site/index.html" And I should see "
\nputs "My awesome string"\n
" in "_site/index.html" diff --git a/features/pagination.feature b/features/pagination.feature index fdf652a2..21b96b08 100644 --- a/features/pagination.feature +++ b/features/pagination.feature @@ -14,7 +14,7 @@ Feature: Site pagination | Wargames2 | 2009-04-27 | default | The only winning move is not to play2. | | Wargames3 | 2009-05-27 | default | The only winning move is not to play3. | | Wargames4 | 2009-06-27 | default | The only winning move is not to play4. | - When I run jekyll + When I run jekyll build Then the _site/page directory should exist And the "_site/page/index.html" file should exist And I should see "" in "_site/page/index.html" @@ -41,7 +41,7 @@ Feature: Site pagination | Wargames2 | 2009-04-27 | default | The only winning move is not to play2. | | Wargames3 | 2009-05-27 | default | The only winning move is not to play3. | | Wargames4 | 2009-06-27 | default | The only winning move is not to play4. | - When I run jekyll + When I run jekyll build Then the _site/blog/page- directory should exist And the "_site/blog/page-/index.html" file should exist And I should see "" in "_site/blog/page-/index.html" @@ -69,7 +69,7 @@ Feature: Site pagination | Wargames2 | 2009-04-27 | default | The only winning move is not to play2. | | Wargames3 | 2009-05-27 | default | The only winning move is not to play3. | | Wargames4 | 2009-06-27 | default | The only winning move is not to play4. | - When I run jekyll + When I run jekyll build Then the _site/blog/page/ directory should exist And the "_site/blog/page//index.html" file should exist And I should see "" in "_site/blog/page//index.html" diff --git a/features/permalinks.feature b/features/permalinks.feature index 879f2590..f63aaf81 100644 --- a/features/permalinks.feature +++ b/features/permalinks.feature @@ -9,7 +9,7 @@ Feature: Fancy permalinks | title | date | content | | None Permalink Schema | 2009-03-27 | Totally nothing. | And I have a configuration file with "permalink" set to "none" - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "Totally nothing." in "_site/none-permalink-schema.html" @@ -19,7 +19,7 @@ Feature: Fancy permalinks | title | date | content | | Pretty Permalink Schema | 2009-03-27 | Totally wordpress. | And I have a configuration file with "permalink" set to "pretty" - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "Totally wordpress." in "_site/2009/03/27/pretty-permalink-schema/index.html" @@ -28,7 +28,7 @@ Feature: Fancy permalinks And I have an "awesome.html" page that contains "Totally awesome" And I have an "sitemap.xml" page that contains "Totally uhm, sitemap" And I have a configuration file with "permalink" set to "pretty" - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "Totally index" in "_site/index.html" And I should see "Totally awesome" in "_site/awesome/index.html" @@ -40,7 +40,7 @@ Feature: Fancy permalinks | title | category | date | content | | Custom Permalink Schema | stuff | 2009-03-27 | Totally custom. | And I have a configuration file with "permalink" set to "/blog/:year/:month/:day/:title" - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "Totally custom." in "_site/blog/2009/03/27/custom-permalink-schema/index.html" @@ -50,7 +50,7 @@ Feature: Fancy permalinks | title | category | date | content | | Custom Permalink Schema | stuff | 2009-03-27 | Totally custom. | And I have a configuration file with "permalink" set to "/:categories/:title.html" - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "Totally custom." in "_site/stuff/custom-permalink-schema.html" @@ -60,7 +60,7 @@ Feature: Fancy permalinks | title | category | date | content | | Custom Permalink Schema | stuff | 2009-03-27 | Totally custom. | And I have a configuration file with "permalink" set to "/:month-:day-:year/:title.html" - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "Totally custom." in "_site/03-27-2009/custom-permalink-schema.html" @@ -69,7 +69,7 @@ Feature: Fancy permalinks And I have the following post: | title | date | permalink | content | | Some post | 2013-04-14 | /custom/posts/1 | bla bla | - When I run jekyll + When I run jekyll build Then the _site 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" @@ -79,7 +79,7 @@ Feature: Fancy permalinks And I have the following post: | title | date | permalink | content | | Some post | 2013-04-14 | /custom/posts/some.html | bla bla | - When I run jekyll + When I run jekyll build Then the _site directory should exist And the _site/custom/posts directory should exist And I should see "bla bla" in "_site/custom/posts/some.html" diff --git a/features/post_data.feature b/features/post_data.feature index 1bd47083..6d92b19e 100644 --- a/features/post_data.feature +++ b/features/post_data.feature @@ -10,7 +10,7 @@ Feature: Post data | title | date | layout | content | | Star Wars | 2009-03-27 | simple | Luke, I am your father. | And I have a simple layout that contains "Post title: {{ page.title }}" - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "Post title: Star Wars" in "_site/2009/03/27/star-wars.html" @@ -21,7 +21,7 @@ Feature: Post data | title | date | layout | content | | Star Wars | 2009-03-27 | simple | Luke, I am your father. | And I have a simple layout that contains "Post url: {{ page.url }}" - When I run jekyll + When I run jekyll build Then 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" @@ -32,7 +32,7 @@ Feature: Post data | title | date | layout | content | | 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 }}" - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "Post date: 27 Mar 2009" in "_site/2009/03/27/star-wars.html" @@ -43,7 +43,7 @@ Feature: Post data | title | date | layout | content | | Star Wars | 2009-03-27 | simple | Luke, I am your father. | And I have a simple layout that contains "Post id: {{ page.id }}" - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "Post id: /2009/03/27/star-wars" in "_site/2009/03/27/star-wars.html" @@ -54,7 +54,7 @@ Feature: Post data | title | date | layout | content | | Star Wars | 2009-03-27 | simple | Luke, I am your father. | And I have a simple layout that contains "Post content: {{ content }}" - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "Post content:

Luke, I am your father.

" in "_site/2009/03/27/star-wars.html" @@ -66,7 +66,7 @@ Feature: Post data | title | date | layout | content | | 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 + When I run jekyll build Then the _site directory should exist And I should see "Post category: movies" in "_site/movies/2009/03/27/star-wars.html" @@ -77,7 +77,7 @@ Feature: Post data | title | date | layout | tag | content | | 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 + When I run jekyll build Then the _site directory should exist And I should see "Post tags: twist" in "_site/2009/05/18/star-wars.html" @@ -90,7 +90,7 @@ Feature: Post data | title | date | layout | content | | 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 + When I run jekyll build Then the _site directory should exist And I should see "Post categories: scifi and movies" in "_site/scifi/movies/2009/03/27/star-wars.html" @@ -103,7 +103,7 @@ Feature: Post data | title | date | layout | content | | 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 + When I run jekyll build Then the _site directory should exist And I should see "Post categories: scifi and movies" in "_site/scifi/movies/2009/03/27/star-wars.html" @@ -114,7 +114,7 @@ Feature: Post data | title | date | layout | category | content | | 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 + When I run jekyll build Then the _site directory should exist And I should see "Post category: movies" in "_site/movies/2009/03/27/star-wars.html" @@ -125,7 +125,7 @@ Feature: Post data | title | date | layout | category | content | | 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 + When I run jekyll build Then the _site directory should exist And I should see "Post category: movies" in "_site/movies/2009/03/27/star-wars.html" @@ -136,7 +136,7 @@ Feature: Post data | title | date | layout | category | content | | 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 + When I run jekyll build Then the _site directory should exist And I should see "Post category: movies" in "_site/movies/2009/03/27/star-wars.html" @@ -148,7 +148,7 @@ Feature: Post data | Star Wars | 2009-03-27 | simple | ['scifi', 'Movies'] | Luke, 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 }}" - When I run jekyll + When I run jekyll build Then 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" @@ -158,7 +158,7 @@ Feature: Post data And I have the following post in "": | title | type | date | content | | my-post | html | 2013-04-12 | Source path: {{ page.path }} | - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "Source path: _posts/2013-04-12-my-post.html" in "_site//2013/04/12/my-post.html" @@ -173,7 +173,7 @@ Feature: Post data And I have the following post: | title | date | path | content | | override | 2013-04-12 | override-path.html | Custom path: {{ page.path }} | - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "Custom path: override-path.html" in "_site/2013/04/12/override.html" @@ -183,7 +183,7 @@ Feature: Post data And I have the following post: | title | date | layout | published | content | | Star Wars | 2009-03-27 | simple | false | Luke, I am your father. | - When I run jekyll + When I run jekyll build Then the _site directory should exist And the "_site/2009/03/27/star-wars.html" file should not exist And I should see "Published!" in "_site/index.html" @@ -195,7 +195,7 @@ Feature: Post data | title | date | layout | author | content | | 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 }}" - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "Post author: Darth Vader" in "_site/2009/03/27/star-wars.html" @@ -208,7 +208,7 @@ Feature: Post data | Some like it hot | 2009-04-27 | ordered | Osgood | Nobody is perfect. | | 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 }}" - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "next post: Some like it hot" in "_site/2009/03/27/star-wars.html" And I should see "Previous post: Some like it hot" in "_site/2009/05/27/terminator.html" diff --git a/features/post_excerpts.feature b/features/post_excerpts.feature index 7f0bdb6e..4ad6d128 100644 --- a/features/post_excerpts.feature +++ b/features/post_excerpts.feature @@ -11,7 +11,7 @@ Feature: Post excerpts And I have the following posts: | title | date | layout | content | | entry1 | 2007-12-31 | post | content for entry1. | - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see exactly "

content for entry1.

" in "_site/index.html" @@ -23,7 +23,7 @@ Feature: Post excerpts And I have the following posts: | title | date | layout | content | | entry1 | 2007-12-31 | post | content for entry1. | - When I run jekyll + When I run jekyll build Then the _site directory should exist And the _site/2007 directory should exist And the _site/2007/12 directory should exist @@ -40,7 +40,7 @@ Feature: Post excerpts And I have the following posts: | title | date | layout | content | | entry1 | 2007-12-31 | post | content for entry1. | - When I run jekyll + When I run jekyll build Then the _site directory should exist And the _site/2007 directory should exist And the _site/2007/12 directory should exist diff --git a/features/site_configuration.feature b/features/site_configuration.feature index 9305bdb1..e0a50136 100644 --- a/features/site_configuration.feature +++ b/features/site_configuration.feature @@ -7,14 +7,14 @@ Feature: Site configuration Given I have a blank site in "_sourcedir" 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 + When I run jekyll build Then the _site directory should exist And I should see "Changing source directory" in "_site/index.html" Scenario: Change destination directory Given I have an "index.html" file that contains "Changing destination directory" And I have a configuration file with "destination" set to "_mysite" - When I run jekyll + When I run jekyll build Then the _mysite directory should exist And I should see "Changing destination directory" in "_mysite/index.html" @@ -25,7 +25,7 @@ Feature: Site configuration | key | value | | source | | | destination | | - When I run jekyll + When I run jekyll build Then the directory should exist And the "/index.html" file should exist And I should see "markdown" in "/index.md" @@ -44,7 +44,7 @@ Feature: Site configuration And I have an "README" file that contains "I want to be excluded" And I have an "index.html" file that contains "I want to be included" And I have a configuration file with "exclude" set to "['Rakefile', 'README']" - When I run jekyll + When I run jekyll build Then I should see "I want to be included" in "_site/index.html" And the "_site/Rakefile" file should not exist And the "_site/README" file should not exist @@ -57,7 +57,7 @@ Feature: Site configuration | value | | README | | Rakefile | - When I run jekyll + When I run jekyll build Then I should see "I want to be included" in "_site/index.html" And the "_site/Rakefile" file should not exist And the "_site/README" file should not exist @@ -65,34 +65,34 @@ Feature: Site configuration Scenario: Use RDiscount 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 "rdiscount" - When I run jekyll + When I run jekyll build Then 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 + When I run jekyll build Then 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 + When I run jekyll build Then the _site directory should exist And I should see "Google" in "_site/index.html" Scenario: Use Maruku 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 "maruku" - When I run jekyll + When I run jekyll build Then 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 + When I run jekyll build Then 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" @@ -100,7 +100,7 @@ Feature: Site configuration Scenario: Highlight code with rouge 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 + When I run jekyll build Then 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" @@ -119,7 +119,7 @@ Feature: Site configuration | title | date | layout | content | | entry1 | 2007-12-31 | post | content for entry1. | | entry2 | 2020-01-31 | post | content for entry2. | - When I run jekyll + When I run jekyll build Then 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" @@ -139,7 +139,7 @@ Feature: Site configuration | title | date | layout | content | | entry1 | 2007-12-31 | post | content for entry1. | | entry2 | 2020-01-31 | post | content for entry2. | - When I run jekyll + When I run jekyll build Then 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" @@ -158,7 +158,7 @@ Feature: Site configuration | title | date | layout | content | | 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 + When I run jekyll build Then 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.

built at 2013-04-09T23:22:00-04:00" in "_site/2013/04/09/entry1.html" @@ -177,7 +177,7 @@ Feature: Site configuration | title | date | layout | content | | 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 + When I run jekyll build Then the _site directory should exist And I should see "Page Layout: 2" in "_site/index.html" And the "_site/2013/04/10/entry1.html" file should exist @@ -195,7 +195,7 @@ Feature: Site configuration | Apples | 2009-03-27 | An article about apples | | Oranges | 2009-04-01 | An article about oranges | | Bananas | 2009-04-05 | An article about bananas | - When I run jekyll + When I run jekyll build Then 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 @@ -208,7 +208,7 @@ Feature: Site configuration | value | | .gitignore | | .foo | - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see ".DS_Store" in "_site/.gitignore" And the "_site/.htaccess" file should not exist @@ -228,7 +228,7 @@ Feature: Site configuration | title | date | layout | content | | entry1 | 2007-12-31 | post | content for entry1. | | entry2 | 2020-01-31 | post | content for entry2. | - When I run jekyll + When I run jekyll build Then 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" @@ -237,7 +237,7 @@ Feature: Site configuration Scenario: Add a gem-based plugin Given I have an "index.html" file that contains "Whatever" And I have a configuration file with "gems" set to "[jekyll_test_plugin]" - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "Whatever" in "_site/index.html" And I should see "this is a test" in "_site/test.txt" @@ -248,7 +248,7 @@ Feature: Site configuration | key | value | | gems | [jekyll_test_plugin] | | whitelist | [] | - When I run jekyll in safe mode + When I run jekyll build --safe Then the _site directory should exist And I should see "Whatever" in "_site/index.html" And the "_site/test.txt" file should not exist @@ -259,7 +259,7 @@ Feature: Site configuration | key | value | | gems | [jekyll_test_plugin, jekyll_test_plugin_malicious] | | whitelist | [jekyll_test_plugin] | - When I run jekyll in safe mode + When I run jekyll build --safe Then the _site directory should exist And I should see "Whatever" in "_site/index.html" And the "_site/test.txt" file should exist diff --git a/features/site_data.feature b/features/site_data.feature index 029b36ff..a7fadf34 100644 --- a/features/site_data.feature +++ b/features/site_data.feature @@ -5,14 +5,14 @@ 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 + When I run jekyll build Then 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 directory And I have a "" page that contains "Source path: {{ page.path }}" - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "Source path: " in "_site/" @@ -24,13 +24,13 @@ Feature: Site data Scenario: Override page.path Given I have an "override.html" page with path "custom-override.html" that contains "Custom path: {{ page.path }}" - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "Custom path: custom-override.html" in "_site/override.html" Scenario: Use site.time variable Given I have an "index.html" page that contains "{{ site.time }}" - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see today's time in "_site/index.html" @@ -42,7 +42,7 @@ Feature: Site data | First Post | 2009-03-25 | My First Post | | Second Post | 2009-03-26 | My Second Post | | Third Post | 2009-03-27 | My Third Post | - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "Third Post: /2009/03/27/third-post.html" in "_site/index.html" @@ -54,7 +54,7 @@ Feature: Site data | First Post | 2009-03-25 | My First Post | | Second Post | 2009-03-26 | My Second Post | | Third Post | 2009-03-27 | My Third Post | - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "Third Post Second Post First Post" in "_site/index.html" @@ -65,7 +65,7 @@ Feature: Site data | title | date | category | content | | Awesome Hack | 2009-03-26 | code | puts 'Hello World' | | Delicious Beer | 2009-03-26 | food | 1) Yuengling | - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "Awesome Hack" in "_site/index.html" @@ -75,7 +75,7 @@ Feature: Site data And I have the following posts: | title | date | tag | content | | Delicious Beer | 2009-03-26 | beer | 1) Yuengling | - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "Yuengling" in "_site/index.html" @@ -89,19 +89,19 @@ Feature: Site data | B | 2009-03-26 | B | | C | 2009-03-26 | C | | last | 2009-04-26 | last | - When I run jekyll + When I run jekyll build Then 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" Scenario: Use configuration date in site payload Given I have an "index.html" page that contains "{{ site.url }}" And I have a configuration file with "url" set to "http://example.com" - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "http://example.com" in "_site/index.html" Scenario: Access Jekyll version via jekyll.version Given I have an "index.html" page that contains "{{ jekyll.version }}" - When I run jekyll + When I run jekyll build Then the _site directory should exist And I should see "\d+\.\d+\.\d+" in "_site/index.html" diff --git a/features/step_definitions/jekyll_steps.rb b/features/step_definitions/jekyll_steps.rb index 45210630..7dbf45e1 100644 --- a/features/step_definitions/jekyll_steps.rb +++ b/features/step_definitions/jekyll_steps.rb @@ -139,24 +139,11 @@ end # ################## -When /^I run jekyll(?: with "(.+)")?$/ do |opt| - run_jekyll_build(opt) -end - -When /^I run jekyll in safe mode$/ do - run_jekyll_build("--safe") -end - -When /^I run jekyll with drafts$/ do - run_jekyll_build("--drafts") -end - -When /^I call jekyll new with test_blank --blank$/ do - run_jekyll_new("test_blank --blank") -end - -When /^I debug jekyll$/ do - run_jekyll_build("--verbose") +When /^I run jekyll(.*)$/ do |args| + status = run_jekyll(args) + if !status || args.include?("--verbose") + puts jekyll_run_output + end end When /^I change "(.*)" to contain "(.*)"$/ do |file, text| diff --git a/features/support/env.rb b/features/support/env.rb index 5f6752aa..80020690 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -23,21 +23,8 @@ def jekyll_run_output File.read(jekyll_output_file) end -def run_jekyll(args, output_file) - command = "#{JEKYLL_PATH} #{args} --trace > #{jekyll_output_file} 2>&1" - system command -end - -def run_jekyll_build(build_args = "") - if !run_jekyll("build #{build_args}", jekyll_output_file) || build_args.eql?("--verbose") - puts jekyll_run_output - end -end - -def run_jekyll_new(new_args = "") - unless run_jekyll("new #{new_args}", jekyll_output_file) - puts jekyll_run_output - end +def run_jekyll(args) + system "#{JEKYLL_PATH} #{args} --trace > #{jekyll_output_file} 2>&1" end def slug(title)