spec/support/file_helpers.rb
# Creates a YAML config file at the specified path.
Creates a YAML config file at the specified path.
Creates a YAML config file at the specified path .
def create_file(path, contents)
    dir = File.dirname(path)
    FileUtils.mkdir_p(dir) unless File.directory?(dir)
    File.open(path, 'w') do |file|
      file.write(contents)
    end
  end
def create_file ( path , contents ) dir = File . dirname ( path ) FileUtils . mkdir_p ( dir ) unless File . directory? ( dir ) File . open ( path , 'w' ) do | file | file . write ( contents ) end end
Creates a YAML config file at the specified path.
Creates a YAML config file at the specified path .
path
contents