Fixed my tests, I need more specific tests for the new command.
This commit is contained in:
parent
b19997aee4
commit
3fdeb8c591
|
@ -6,9 +6,9 @@ Feature: Create sites
|
||||||
Scenario: Blank site
|
Scenario: Blank site
|
||||||
Given I do not have a "test_blank" directory
|
Given I do not have a "test_blank" directory
|
||||||
When I call jekyll new with test_blank --blank
|
When I call jekyll new with test_blank --blank
|
||||||
Then the _layouts directory should exist
|
Then the _layouts directory should exist in the test_blank path
|
||||||
And the _posts directory should exist
|
And the _posts directory should exist in the test_blank path
|
||||||
And the "index.html" file should exist
|
And the "index.html" file should exist in the test_blank path
|
||||||
|
|
||||||
Scenario: Basic site
|
Scenario: Basic site
|
||||||
Given I have an "index.html" file that contains "Basic Site"
|
Given I have an "index.html" file that contains "Basic Site"
|
||||||
|
|
|
@ -140,6 +140,15 @@ Then /^the (.*) directory should exist$/ do |dir|
|
||||||
assert File.directory?(dir), "The directory \"#{dir}\" does not exist"
|
assert File.directory?(dir), "The directory \"#{dir}\" does not exist"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Then /^the "(.*)" file should exist in the (.*) path$/ do |file, path|
|
||||||
|
assert File.file?("#{TEST_DIR}/#{path}/#{file}")
|
||||||
|
end
|
||||||
|
|
||||||
|
Then /^the (.*) directory should exist in the (.*) path$/ do |dir, path|
|
||||||
|
assert File.directory?("#{TEST_DIR}/#{path}/#{dir}"),
|
||||||
|
"The directory \"#{dir}\" does not exist"
|
||||||
|
end
|
||||||
|
|
||||||
Then /^I should see "(.*)" in "(.*)"$/ do |text, file|
|
Then /^I should see "(.*)" in "(.*)"$/ do |text, file|
|
||||||
assert Regexp.new(text).match(File.open(file).readlines.join)
|
assert Regexp.new(text).match(File.open(file).readlines.join)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue