spec/spec_helper.rb in travis-1.0.1 vs spec/spec_helper.rb in travis-1.0.2

- old
+ new

@@ -2,15 +2,25 @@ require 'support/fake_github' require 'support/helpers' require 'fileutils' require 'travis' +require 'highline' +require 'tmpdir' +temp_dir = nil + RSpec.configure do |c| c.include Helpers + c.before do - temp_dir = File.expand_path('../tmp', __FILE__) + HighLine.use_color = false + temp_dir = File.expand_path('travis-spec', Dir.tmpdir) FileUtils.rm_rf(temp_dir) FileUtils.mkdir_p(temp_dir) ENV['TRAVIS_CONFIG_PATH'] = File.expand_path('travis', temp_dir) + end + + c.after do + FileUtils.rm_rf(temp_dir) end end