diff --git a/features/create_sites.feature b/features/create_sites.feature index 0f3bb778..33327df6 100644 --- a/features/create_sites.feature +++ b/features/create_sites.feature @@ -143,7 +143,13 @@ Feature: Create sites Scenario: Basic site with unpublished page Given I have an "index.html" page with title "index" that contains "Published page" And I have a "secret.html" page with published "false" that contains "Unpublished page" + When I run jekyll Then the _site directory should exist And the "_site/index.html" file should exist But the "_site/secret.html" file should not exist + + When I run jekyll with "--unpublished" + Then the _site directory should exist + And the "_site/index.html" file should exist + And the "_site/secret.html" file should exist diff --git a/features/step_definitions/jekyll_steps.rb b/features/step_definitions/jekyll_steps.rb index 00264fb6..93de5c10 100644 --- a/features/step_definitions/jekyll_steps.rb +++ b/features/step_definitions/jekyll_steps.rb @@ -130,9 +130,8 @@ Given /^I have a configuration file with "([^\"]*)" set to:$/ do |key, table| end end - -When /^I run jekyll$/ do - run_jekyll_build +When /^I run jekyll(?: with "(.+)")?$/ do |opt| + run_jekyll_build(opt) end When /^I run jekyll in safe mode$/ do