From 270ad54eb365466c0e87593650b7ce616427e94c Mon Sep 17 00:00:00 2001 From: zachgersh Date: Mon, 10 Jun 2013 12:03:08 -0700 Subject: [PATCH] Removed extra steps and refactored my tests thanks to Maul. --- features/create_sites.feature | 6 +++--- features/step_definitions/jekyll_steps.rb | 9 --------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/features/create_sites.feature b/features/create_sites.feature index b84fac8a..346c0350 100644 --- a/features/create_sites.feature +++ b/features/create_sites.feature @@ -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" diff --git a/features/step_definitions/jekyll_steps.rb b/features/step_definitions/jekyll_steps.rb index abdf07d3..afd20dd2 100644 --- a/features/step_definitions/jekyll_steps.rb +++ b/features/step_definitions/jekyll_steps.rb @@ -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