Broken test committed. Can't find proper directories.
This commit is contained in:
parent
7fba828f02
commit
b19997aee4
|
@ -3,6 +3,13 @@ Feature: Create sites
|
|||
I want to be able to make a static site
|
||||
In order to share my awesome ideas with the interwebs
|
||||
|
||||
Scenario: Blank site
|
||||
Given I do not have a "test_blank" directory
|
||||
When I call jekyll new with test_blank --blank
|
||||
Then the _layouts directory should exist
|
||||
And the _posts directory should exist
|
||||
And the "index.html" file should exist
|
||||
|
||||
Scenario: Basic site
|
||||
Given I have an "index.html" file that contains "Basic Site"
|
||||
When I run jekyll
|
||||
|
|
|
@ -4,15 +4,19 @@ Before do
|
|||
Dir.chdir(TEST_DIR)
|
||||
end
|
||||
|
||||
After do
|
||||
Dir.chdir(File.expand_path("..", TEST_DIR))
|
||||
FileUtils.rm_rf(TEST_DIR)
|
||||
end
|
||||
#After do
|
||||
# Dir.chdir(File.expand_path("..", TEST_DIR))
|
||||
# FileUtils.rm_rf(TEST_DIR)
|
||||
#end
|
||||
|
||||
Given /^I have a blank site in "(.*)"$/ do |path|
|
||||
FileUtils.mkdir(path)
|
||||
end
|
||||
|
||||
Given /^I do not have a "(.*)" directory$/ do |path|
|
||||
Dir.exists?("#{TEST_DIR}/#{path}")
|
||||
end
|
||||
|
||||
# Like "I have a foo file" but gives a yaml front matter so jekyll actually processes it
|
||||
Given /^I have an? "(.*)" page(?: with (.*) "(.*)")? that contains "(.*)"$/ do |file, key, value, text|
|
||||
File.open(file, 'w') do |f|
|
||||
|
@ -118,6 +122,10 @@ When /^I run jekyll with drafts$/ do
|
|||
run_jekyll(:drafts => true)
|
||||
end
|
||||
|
||||
When /^I call jekyll new with test_blank --blank$/ do
|
||||
call_jekyll_new(:path => "test_blank", :blank => true)
|
||||
end
|
||||
|
||||
When /^I debug jekyll$/ do
|
||||
run_jekyll(:debug => true)
|
||||
end
|
||||
|
|
|
@ -17,6 +17,7 @@ end
|
|||
def call_jekyll_new(opts = {})
|
||||
command = JEKYLL_PATH.clone
|
||||
command << " new"
|
||||
command << " #{opts[:path]}" if opts[:path]
|
||||
command << " --blank" if opts[:blank]
|
||||
command << " >> /dev/null 2>&1" if opts[:debug].nil?
|
||||
system command
|
||||
|
|
Loading…
Reference in New Issue