Sha256: 2bf7d57d23fc92f6723aeeeea961e37e9f48c0c6c4753cbda2dd0994a7ae78a8

Contents?: true

Size: 466 Bytes

Versions: 2

Compression:

Stored size: 466 Bytes

Contents

require 'fileutils'
require 'tmpdir'

require 'rspec/expectations'
require 'mixlib/shellout'


# Run each test in a temporary directory, initialized as a git repository
FileUtils::mkdir_p 'tmp'

Before do
  @orig_wd = Dir.getwd
  @tmp_wd = Dir.mktmpdir(nil, 'tmp')
  Dir.chdir(@tmp_wd)
end

After do
  Dir::chdir(@orig_wd)
  if ENV['DEBUG']
    puts "Keeping working directory #{@tmp_wd} for debugging"
  else
    FileUtils::rm_rf(@tmp_wd)
  end
  @tmp_wd = nil
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
metarake-0.1.1 features/support/env.rb
metarake-0.1.0 features/support/env.rb