module Cucumber::Formatter::Io
def ensure_dir(path, name)
def ensure_dir(path, name) raise "You *must* specify --out DIR for the #{name} formatter" unless path.instance_of? String raise "I can't write #{name} reports to a file - it has to be a directory" if File.file?(path) FileUtils.mkdir_p(path) unless File.directory?(path) File.absolute_path path end