spec/spec_helper.rb in travis-1.0.3 vs spec/spec_helper.rb in travis-1.1.0
- old
+ new
@@ -4,17 +4,20 @@
require 'fileutils'
require 'travis'
require 'highline'
require 'tmpdir'
+require 'pry' # pry doesn't like us mocking $stdout
temp_dir = nil
+HighLine.use_color = false
+HighLine.define_singleton_method(:use_color=) { |_| }
+
RSpec.configure do |c|
c.include Helpers
c.before do
- 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