Sha256: 6152be89dca9127c395bf0acd2cf1270bd714a057d43d6a6725a103c9bb004ef

Contents?: true

Size: 657 Bytes

Versions: 3

Compression:

Stored size: 657 Bytes

Contents

# frozen_string_literal: true

module Buildkite::TestCollector::MinitestPlugin
  class Reporter < Minitest::StatisticsReporter
    def initialize(io, options)
      super
      @io = io
      @options = options
    end

    def record(result)
      super

      if Buildkite::TestCollector.uploader
        if trace = Buildkite::TestCollector.uploader.traces[result.source_location]
          Buildkite::TestCollector.session.add_example_to_send_queue(result.source_location)
        end
      end
    end

    def report
      super

      Buildkite::TestCollector.session.send_remaining_data
      Buildkite::TestCollector.session.close
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
buildkite-test_collector-2.2.0 lib/buildkite/test_collector/minitest_plugin/reporter.rb
buildkite-test_collector-2.1.0 lib/buildkite/test_collector/minitest_plugin/reporter.rb
buildkite-test_collector-2.1.0.pre lib/buildkite/test_collector/minitest_plugin/reporter.rb