Switch it to file.exists? and File.directory? so 1.8.7 doesn't complain.

This commit is contained in:
zachgersh 2013-06-04 00:53:47 -07:00
parent 3fdeb8c591
commit 44cfa0540f
1 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ Given /^I have a blank site in "(.*)"$/ do |path|
end end
Given /^I do not have a "(.*)" directory$/ do |path| Given /^I do not have a "(.*)" directory$/ do |path|
Dir.exists?("#{TEST_DIR}/#{path}") File.directory?("#{TEST_DIR}/#{path}")
end end
# Like "I have a foo file" but gives a yaml front matter so jekyll actually processes it # Like "I have a foo file" but gives a yaml front matter so jekyll actually processes it
@ -141,7 +141,7 @@ Then /^the (.*) directory should exist$/ do |dir|
end end
Then /^the "(.*)" file should exist in the (.*) path$/ do |file, path| Then /^the "(.*)" file should exist in the (.*) path$/ do |file, path|
assert File.file?("#{TEST_DIR}/#{path}/#{file}") assert File.exists?("#{TEST_DIR}/#{path}/#{file}")
end end
Then /^the (.*) directory should exist in the (.*) path$/ do |dir, path| Then /^the (.*) directory should exist in the (.*) path$/ do |dir, path|