Sha256: 2df7149492f14cf39117114e0abc85ea2d3befc915f768accadedf678ff44e73
Contents?: true
Size: 898 Bytes
Versions: 21
Compression:
Stored size: 898 Bytes
Contents
module Pact module TaskHelper def failure_message redify( "\n* * * * * * * * * * * * * * * * * * *\n" + "Provider did not honour pact file.\nSee\n * #{Pact.configuration.log_path}\n * #{Pact.configuration.tmp_dir}\nfor logs and pact files." + "\n* * * * * * * * * * * * * * * * * * *\n\n" ) end def redify string "\e[31m#{string}\e[m" end def handle_verification_failure exit_status = yield if exit_status != 0 $stderr.puts failure_message fail end end def spec_criteria defaults = {description: nil, provider_state: nil} criteria = {} [:description, :provider_state].each do | key | value = ENV.fetch("PACT_#{key.to_s.upcase}", defaults[key]) criteria[key] = Regexp.new(value) unless value.nil? end criteria.any? ? criteria : nil end end end
Version data entries
21 entries across 21 versions & 1 rubygems