Skip to content

Commit

Permalink
fix: show pending test output in yellow instead of red
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Jan 20, 2020
1 parent f09de86 commit e8d4a55
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/pact/provider/pact_spec_runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit e8d4a55

Please sign in to comment.