diff --git a/features/create_sites.feature b/features/create_sites.feature index 3346b7bdaf6..d10f1625c21 100644 --- a/features/create_sites.feature +++ b/features/create_sites.feature @@ -20,7 +20,7 @@ Feature: Create sites Scenario: Basic site with layout and a page Given I have a _layouts directory - And I have an "index.html" file 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 }}" When I run jekyll Then the _site directory should exist @@ -30,17 +30,17 @@ Feature: Create sites Given I have a _layouts directory And I have a _posts directory And I have the following post: - | title | date | layout | content | - | Wargames | 3/27/2009 | default | Would you like to play a game?" | + | title | date | layout | content | + | Wargames | 3/27/2009 | default | The only winning move is not to play. | And I have a default layout that contains "Post Layout: {{ content }}" When I run jekyll Then the _site directory should exist - And I should see "Post Layout: Would you like to play a game?" in "_site/2009/03/27/wargames.html" + 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 include tag Given I have a _includes directory - And I have an "index.html" file that contains "Basic Site with include tag: {% include about.html %}" - And I have an "_includes/about.html" file that contains "Generated by Jekyll" + 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 Then the _site directory should exist And I should see "Basic Site with include tag: Generated by Jekyll" in "_site/index.html" diff --git a/features/step_definitions/jekyll_steps.rb b/features/step_definitions/jekyll_steps.rb index 33156469c63..f2ece816b5b 100644 --- a/features/step_definitions/jekyll_steps.rb +++ b/features/step_definitions/jekyll_steps.rb @@ -8,23 +8,28 @@ FileUtils.rm_rf(TEST_DIR) end -Given /^I have an "(.*)" file(?: with (.*) "(.*)")? that contains "(.*)"$/ do |file, key, value, text| +Given /^I have an "(.*)" page(?: with layout "(.*)")? that contains "(.*)"$/ do |file, layout, text| File.open(file, 'w') do |f| - if key && value - f.write <