Removed extra steps and refactored my tests thanks to Maul.

This commit is contained in:
zachgersh 2013-06-10 12:03:08 -07:00
parent 042c960df0
commit 270ad54eb3
2 changed files with 3 additions and 12 deletions

View File

@ -6,9 +6,9 @@ Feature: Create sites
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 in the test_blank path
And the _posts directory should exist in the test_blank path
And the "index.html" file should exist in the test_blank path
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"

View File

@ -140,15 +140,6 @@ Then /^the (.*) directory should exist$/ do |dir|
assert File.directory?(dir), "The directory \"#{dir}\" does not exist"
end
Then /^the "(.*)" file should exist in the (.*) path$/ do |file, path|
assert File.exists?("#{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|
assert Regexp.new(text).match(File.open(file).readlines.join)
end