1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

No assuming active support!

This commit is contained in:
Jonas Nicklas 2010-06-29 21:54:23 +02:00
parent 71fbd9eb8c
commit e6ae5d7234

View file

@ -5,7 +5,7 @@ module Capybara
def save_and_open_page(html)
name = File.join(*[Capybara.save_and_open_page_path, "capybara-#{Time.new.strftime("%Y%m%d%H%M%S")}.html"].compact)
unless Capybara.save_and_open_page_path.blank? || File.directory?(Capybara.save_and_open_page_path )
unless Capybara.save_and_open_page_path.nil? || File.directory?(Capybara.save_and_open_page_path )
FileUtils.mkdir_p(Capybara.save_and_open_page_path)
end
FileUtils.touch(name) unless File.exist?(name)