Sha256: 248a75b58b1b8acbc851f63d31c20014720039ae113d5bca6d1ec819ad096c9f

Contents?: true

Size: 1.04 KB

Versions: 35

Compression:

Stored size: 1.04 KB

Contents

class ProjectFixtureHelper

  def self.fixtures_path
    File.expand_path(File.dirname(__FILE__) + "/fixtures")
  end
  
  def self.original_fixtures_path
    File.expand_path(File.dirname(__FILE__) + "/fixtures.orig")
  end
  
  def self.create_project_fixtures
    clear_project_fixtures
    FileUtils.cp_r(original_fixtures_path, fixtures_path)
  end
  
  def self.clear_project_fixtures
    FileUtils.rm_rf(fixtures_path)
  end
  
  def self.make_subproject_fixtures
    FileUtils.mkdir_p(fixtures_path + "/myproject/test1")
    FileUtils.mkdir_p(fixtures_path + "/myproject/test2")
    FileUtils.mkdir_p(fixtures_path + "/myproject/.redcar")
    File.open(fixtures_path + "/myproject/.redcar/test_config", "w") {|f| f.print "this is a config file" }
    File.open(fixtures_path + "/myproject/test1/a.txt", "w") {|f| f.print "this is a project file" }
    File.open(fixtures_path + "/myproject/test1/b.txt", "w") {|f| f.print "this is a project file" }
    File.open(fixtures_path + "/myproject/test1/c.txt", "w") {|f| f.print "this is a project file" }
  end
end

Version data entries

35 entries across 35 versions & 2 rubygems

Version Path
redcar-0.13 plugins/project/spec/fixture_helper.rb
redcar-dev-0.13.5dev plugins/project/spec/fixture_helper.rb
redcar-dev-0.13.4dev plugins/project/spec/fixture_helper.rb
redcar-dev-0.13.3dev plugins/project/spec/fixture_helper.rb
redcar-dev-0.13.2dev plugins/project/spec/fixture_helper.rb
redcar-dev-0.13.1dev plugins/project/spec/fixture_helper.rb
redcar-0.12.1 plugins/project/spec/fixture_helper.rb
redcar-dev-0.13.0dev plugins/project/spec/fixture_helper.rb
redcar-0.12 plugins/project/spec/fixture_helper.rb
redcar-dev-0.12.27dev plugins/project/spec/fixture_helper.rb
redcar-dev-0.12.26dev plugins/project/spec/fixture_helper.rb
redcar-dev-0.12.25dev plugins/project/spec/fixture_helper.rb
redcar-dev-0.12.24dev plugins/project/spec/fixture_helper.rb
redcar-dev-0.12.23dev plugins/project/spec/fixture_helper.rb
redcar-dev-0.12.22dev plugins/project/spec/fixture_helper.rb
redcar-dev-0.12.21dev plugins/project/spec/fixture_helper.rb
redcar-dev-0.12.20dev plugins/project/spec/fixture_helper.rb
redcar-dev-0.12.19dev plugins/project/spec/fixture_helper.rb
redcar-dev-0.12.18dev plugins/project/spec/fixture_helper.rb
redcar-dev-0.12.17dev plugins/project/spec/fixture_helper.rb