From 64ce0aa14f575fc98fef92ac8d47cea8e3c1ec0c Mon Sep 17 00:00:00 2001 From: David Schmitt Date: Fri, 15 Feb 2019 13:40:26 +0200 Subject: [PATCH] Remove `--color` from everywhere RSpec 3 defaults to using color when possible, and people can override this setting in their `$HOME\.rspec` if required. This fixes #170 --- .rspec | 1 - lib/puppetlabs_spec_helper/rake_tasks.rb | 2 +- lib/puppetlabs_spec_helper/tasks/beaker.rb | 2 +- spec/watchr.rb | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.rspec b/.rspec index 333d91ee..8e877b0a 100644 --- a/.rspec +++ b/.rspec @@ -1,3 +1,2 @@ --format documentation ---color --order rand diff --git a/lib/puppetlabs_spec_helper/rake_tasks.rb b/lib/puppetlabs_spec_helper/rake_tasks.rb index f628ef2a..a1f75cf7 100644 --- a/lib/puppetlabs_spec_helper/rake_tasks.rb +++ b/lib/puppetlabs_spec_helper/rake_tasks.rb @@ -29,7 +29,7 @@ pattern = 'spec/{aliases,classes,defines,functions,hosts,integration,plans,tasks,type_aliases,types,unit}/**/*_spec.rb' RSpec::Core::RakeTask.new(:spec_standalone) do |t, args| - t.rspec_opts = ['--color'] + t.rspec_opts = [] t.rspec_opts << ENV['CI_SPEC_OPTIONS'] unless ENV['CI_SPEC_OPTIONS'].nil? if ENV['CI_NODE_TOTAL'] && ENV['CI_NODE_INDEX'] ci_total = ENV['CI_NODE_TOTAL'].to_i diff --git a/lib/puppetlabs_spec_helper/tasks/beaker.rb b/lib/puppetlabs_spec_helper/tasks/beaker.rb index cd38b0a3..31cc23b7 100644 --- a/lib/puppetlabs_spec_helper/tasks/beaker.rb +++ b/lib/puppetlabs_spec_helper/tasks/beaker.rb @@ -59,7 +59,7 @@ def vagrant_ssh(set, node = nil) class SetupBeaker def self.setup_beaker(t) - t.rspec_opts = ['--color'] + t.rspec_opts = [] t.pattern = 'spec/acceptance' # TEST_TIERS env variable is a comma separated list of tiers to run. e.g. low, medium, high if ENV['TEST_TIERS'] diff --git a/spec/watchr.rb b/spec/watchr.rb index 4ca99771..9a091a2c 100644 --- a/spec/watchr.rb +++ b/spec/watchr.rb @@ -24,7 +24,7 @@ def run(cmd) def run_spec_test(file) if File.exist? file - result = run "rspec --format p --color #{file}" + result = run "rspec --format p #{file}" growl result.split("\n").last puts result else