lib/pact/provider/rspec/pact_broker_formatter.rb in pact-1.30.0 vs lib/pact/provider/rspec/pact_broker_formatter.rb in pact-1.31.0
- old
+ new
@@ -6,37 +6,23 @@
module Pact
module Provider
module RSpec
class PactBrokerFormatter < ::RSpec::Core::Formatters::BaseFormatter
Pact::RSpec.with_rspec_3 do
- ::RSpec::Core::Formatters.register self, :message, :dump_summary, :stop, :seed, :close
+ ::RSpec::Core::Formatters.register self, :stop, :close
end
attr_reader :output_hash
def initialize(output)
super
- @output_hash = {
- :version => ::RSpec::Core::Version::STRING
- }
+ @output_hash = {}
end
- def message(notification)
- (@output_hash[:messages] ||= []) << notification.message
- end
-
- def dump_summary(summary)
- end
-
def stop(notification)
@output_hash[:tests] = notification
.examples
.map { |example| format_example(example) }
- end
-
- def seed(notification)
- return unless notification.seed_used?
- @output_hash[:seed] = notification.seed
end
def close(_notification)
Pact::Provider::VerificationResults::PublishAll.call(Pact.provider_world.pact_sources, output_hash)
end