class RSpec::Support::DirectoryMaker
def self.mkdir_p(path)
- Api: - private
def self.mkdir_p(path) stack = generate_stack(path) path.split(File::SEPARATOR).each do |part| stack = generate_path(stack, part) begin Dir.mkdir(stack) unless directory_exists?(stack) rescue Errno::EEXIST => e raise e unless directory_exists?(stack) rescue Errno::ENOTDIR => e raise Errno::EEXIST, e.message end end end