Sha256: 69c867d2be2d1ad3d07e30138b17968d7848938323ee5613a07832bd00903b51

Contents?: true

Size: 766 Bytes

Versions: 7

Compression:

Stored size: 766 Bytes

Contents

# frozen_string_literal: true

module Mutant
  class Reporter
    class CLI
      class Printer
        # Test result reporter
        class TestResult < self

          delegate :tests, :runtime

          STATUS_FORMAT = '- %d @ runtime: %s'.freeze
          OUTPUT_HEADER = 'Test Output:'.freeze
          TEST_FORMAT   = '  - %s'.freeze

          # Run test result reporter
          #
          # @return [undefined]
          def run
            info(STATUS_FORMAT, tests.length, runtime)
            tests.each do |test|
              info(TEST_FORMAT, test.identification)
            end
            puts(OUTPUT_HEADER)
            puts(object.output)
          end

        end # TestResult
      end # Printer
    end # CLI
  end # Reporter
end # Mutant

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
mutant-0.8.23 lib/mutant/reporter/cli/printer/test_result.rb
mutant-0.8.22 lib/mutant/reporter/cli/printer/test_result.rb
mutant-0.8.21 lib/mutant/reporter/cli/printer/test_result.rb
mutant-0.8.20 lib/mutant/reporter/cli/printer/test_result.rb
mutant-0.8.19 lib/mutant/reporter/cli/printer/test_result.rb
mutant-0.8.18 lib/mutant/reporter/cli/printer/test_result.rb
mutant-0.8.17 lib/mutant/reporter/cli/printer/test_result.rb