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

Version Path
redcar-0.5.2dev plugins/project/spec/spec_helper.rb
redcar-0.5.1dev plugins/project/spec/spec_helper.rb
redcar-0.4.1 plugins/project/spec/spec_helper.rb
redcar-0.4 plugins/project/spec/spec_helper.rb
redcar-0.3.10.1dev plugins/project/spec/spec_helper.rb
redcar-0.3.10.0dev plugins/project/spec/spec_helper.rb
redcar-0.3.9 plugins/project/spec/spec_helper.rb
redcar-0.3.9.0dev plugins/project/spec/spec_helper.rb
redcar-0.3.8.4 plugins/project/spec/spec_helper.rb
redcar-0.3.8.3 plugins/project/spec/spec_helper.rb
redcar-0.3.8.2 plugins/project/spec/spec_helper.rb
redcar-0.3.8.1 plugins/project/spec/spec_helper.rb
redcar-0.3.8 plugins/project/spec/spec_helper.rb
redcar-0.3.7.1 plugins/project/spec/spec_helper.rb
redcar-0.3.7 plugins/project/spec/spec_helper.rb
redcar-0.3.6 plugins/project/spec/spec_helper.rb
redcar-0.3.5 plugins/project/spec/spec_helper.rb