From e8d4a557cf3c311f5ff4fcb1c07cd6338764a7b8 Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Mon, 20 Jan 2020 19:58:45 +1100 Subject: [PATCH] fix: show pending test output in yellow instead of red --- lib/pact/provider/pact_spec_runner.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/pact/provider/pact_spec_runner.rb b/lib/pact/provider/pact_spec_runner.rb index a9ad378d..e05387a0 100644 --- a/lib/pact/provider/pact_spec_runner.rb +++ b/lib/pact/provider/pact_spec_runner.rb @@ -91,7 +91,7 @@ def run_specs ::RSpec::Core::CommandLine.new(NoConfigurationOptions.new) .run(::RSpec.configuration.output_stream, ::RSpec.configuration.error_stream) end - (all_pacts_pending? || options[:ignore_failures]) ? 0 : exit_code + pending_mode? ? 0 : exit_code end def rspec_runner_options @@ -148,7 +148,7 @@ def configure_output ::RSpec.configuration.full_backtrace = @options[:full_backtrace] - ::RSpec.configuration.failure_color = :yellow if @options[:ignore_failures] + ::RSpec.configuration.failure_color = :yellow if pending_mode? end def ordered_pact_json(pact_json) @@ -169,6 +169,10 @@ def class_exists? name false end + def pending_mode? + (all_pacts_pending? || options[:ignore_failures]) + end + def executing_with_ruby? ENV['PACT_EXECUTING_LANGUAGE'] == 'ruby' end