Sha256: 42cd071a8f1b61a6dd132e8d006bdf75226e9d904d64b577243034a529c030d8

Contents?: true

Size: 750 Bytes

Versions: 99

Compression:

Stored size: 750 Bytes

Contents

module CommonHelpers
  def in_tmp_folder(&block)
    FileUtils.chdir(@tmp_root, &block)
  end

  def in_project_folder(&block)
    project_folder = @active_project_folder || @tmp_root
    FileUtils.chdir(project_folder, &block)
  end

  def in_home_folder(&block)
    FileUtils.chdir(@home_path, &block)
  end

  def force_local_lib_override(project_name = @project_name)
    rakefile = File.read(File.join(project_name, 'Rakefile'))
    File.open(File.join(project_name, 'Rakefile'), "w+") do |f|
      f << "$:.unshift('#{@lib_path}')\n"
      f << rakefile
    end
  end

  def setup_active_project_folder project_name
    @active_project_folder = File.join(@tmp_root, project_name)
    @project_name = project_name
  end
end

World(CommonHelpers)

Version data entries

99 entries across 93 versions & 30 rubygems

Version Path
albanpeignier-system-builder-0.0.2 features/support/common.rb
dimus-taxamatch_rb-0.1.1 features/support/common.rb
dimus-taxamatch_rb-0.1.2 features/support/common.rb
drcapulet-shorty-0.1.0 features/support/common.rb
drcapulet-shorty-0.1.1 features/support/common.rb
kennethkalmer-postini-0.1.0 features/support/common.rb
parolkar-obey_robots_dot_txt-1.0.0 features/support/common.rb
srizzo-gemtest-0.0.2 features/support/common.rb
rubigen-1.5.8 features/support/common.rb
system-builder-0.0.26 features/support/common.rb
rubigen-1.5.7 features/support/common.rb
engineyard-dns-1.1.0 features/support/common.rb
system-builder-0.0.23 features/support/common.rb
system-builder-0.0.22 features/support/common.rb
engineyard-dns-1.0.0 features/support/common.rb
engineyard-dns-0.5.0 features/support/common.rb
engineyard-dns-0.4.0 features/support/common.rb
engineyard-dnsimple-0.3.0 features/support/common.rb
engineyard-dnsimple-0.2.0 features/support/common.rb
engineyard-dnsimple-0.1.2 features/support/common.rb