Sha256: 89be40c401a805992c64ecf560fd1f8083ed027f2e817ecf2dd322fe7c86e062

Contents?: true

Size: 713 Bytes

Versions: 10

Compression:

Stored size: 713 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

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
buildkite-test_collector-2.7.2 lib/buildkite/test_collector/minitest_plugin/reporter.rb
buildkite-test_collector-2.7.1 lib/buildkite/test_collector/minitest_plugin/reporter.rb
buildkite-test_collector-2.7.0 lib/buildkite/test_collector/minitest_plugin/reporter.rb
buildkite-test_collector-2.6.1 lib/buildkite/test_collector/minitest_plugin/reporter.rb
buildkite-test_collector-2.6.0 lib/buildkite/test_collector/minitest_plugin/reporter.rb
buildkite-test_collector-2.5.0 lib/buildkite/test_collector/minitest_plugin/reporter.rb
buildkite-test_collector-2.4.0 lib/buildkite/test_collector/minitest_plugin/reporter.rb
buildkite-test_collector-2.3.2 lib/buildkite/test_collector/minitest_plugin/reporter.rb
buildkite-test_collector-2.3.1 lib/buildkite/test_collector/minitest_plugin/reporter.rb
buildkite-test_collector-2.3.0 lib/buildkite/test_collector/minitest_plugin/reporter.rb