Sha256: ed5385d2f19d66e651412f6c8908865982b49614a841c4c75774e6f50b6a7406
Contents?: true
Size: 603 Bytes
Versions: 17
Compression:
Stored size: 603 Bytes
Contents
$:.push File.join(File.dirname(__FILE__), '..', '..', '..', 'lib') require 'redcar' Redcar.environment = :test Redcar.load def write_dir_contents(dirname, files) FileUtils.mkdir_p(dirname) files.each do |filename, contents| if contents.is_a?(Hash) write_dir_contents(dirname + "/" + filename, contents) else File.open(dirname + "/" + filename, "w") {|f| f.print contents} end end end def write_file(dirname, file, content) File.open(File.join(dirname, file), "w") {|f| f.puts content } end def remove_file(dirname, file) FileUtils.rm_f(File.join(dirname, file)) end
Version data entries
17 entries across 17 versions & 1 rubygems