Sha256: 57aebab9e0e09bf80033131130ca6196d9db44581587ef63536f0dc6ea36becf
Contents?: true
Size: 1.25 KB
Versions: 6
Compression:
Stored size: 1.25 KB
Contents
require 'simplecov' require 'coveralls' SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[ SimpleCov::Formatter::HTMLFormatter, Coveralls::SimpleCov::Formatter ] SimpleCov.start do add_filter '/spec/' add_filter '/vendor/' 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 } # [todo] - test is too slow RSpec.configure do |config| config.before :suite do cache_dir = get_cache_dir unless File.exists?(cache_dir) ENV['VVMROOT'] = cache_dir FileUtils.mkdir_p(cache_dir) Installer.fetch %w{ v7-4-083 v7-4-103 }.each do |v| i = Installer.new(v) i.checkout i.configure i.make_install end Installer.cp_etc end end config.before :all do @tmp = Dir.mktmpdir FileUtils.cp_r(get_cache_dir, @tmp) ENV['VVMROOT'] = File.expand_path(File.join(@tmp, '.vvm_cache')) ENV['VVMOPT'] = nil end config.after :all do FileUtils.rm_rf(@tmp) end end def get_cache_dir File.expand_path(File.join(File.dirname(__FILE__), '..', '.vvm_cache')) end
Version data entries
6 entries across 6 versions & 1 rubygems