Sha256: f9f8a5dc3ab3dc2740647b65c4e50f60200a3321a3fb076cade6d468b8152b93

Contents?: true

Size: 1.09 KB

Versions: 1

Compression:

Stored size: 1.09 KB

Contents

require 'simplecov'
require 'coveralls'
Coveralls.wear!
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
  SimpleCov::Formatter::HTMLFormatter,
  Coveralls::SimpleCov::Formatter
]
SimpleCov.start do
  add_filter '/spec/'
end

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))
require 'rspec'
require 'fileutils'
require 'tmpdir'
require 'vvm-rb'
include VvmRb

Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}

RSpec.configure do |config|
  config.before :suite do
    cache_dir = get_cache_dir
    unless Dir.exists?(cache_dir)
      FileUtils.mkdir_p(cache_dir)
      %w{ v7-3-969 v7-4 }.each do |v|
        i = Installer.new(v)
        i.dot_dir = cache_dir
        i.fetch
        i.checkout
        i.configure
        i.make_install
        i.cp_etc
      end
    end
  end

  config.before :all do
    @tmp = Dir.mktmpdir
    FileUtils.cp_r(get_cache_dir, @tmp)
    @vvm_tmp = File.expand_path(File.join(@tmp, '.vvm_cache'))
    self.dot_dir = @vvm_tmp
  end

  config.after :all do
    FileUtils.rm_rf(@tmp)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vvm-rb-0.0.4 spec/spec_helper.rb