Sha256: cf39c55cff7d56a3e0003cef9617f2667e9e6aa6a159fa4c0fa247d715339d60

Contents?: true

Size: 1.16 KB

Versions: 38

Compression:

Stored size: 1.16 KB

Contents

# frozen_string_literal: true

module Mutant
  class Reporter
    class CLI
      class Printer
        # Env printer
        class Env < self
          delegate(
            :amount_mutations,
            :amount_selected_tests,
            :amount_subjects,
            :amount_total_tests,
            :config,
            :test_subject_ratio
          )

          FORMATS = IceNine.deep_freeze([
            [:info,   'Subjects:        %s',        :amount_subjects      ],
            [:info,   'Total-Tests:     %s',        :amount_total_tests   ],
            [:info,   'Selected-Tests:  %s',        :amount_selected_tests],
            [:info,   'Tests/Subject:   %0.2f avg', :test_subject_ratio   ],
            [:info,   'Mutations:       %s',        :amount_mutations     ]
          ])

          # Run printer
          #
          # @return [undefined]
          def run
            info('Mutant environment:')
            visit(Config, config)
            FORMATS.each do |report, format, value|
              __send__(report, format, __send__(value))
            end
          end
        end # EnvProgress
      end # Printer
    end # CLI
  end # Reporter
end # Mutant

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
mutant-0.10.24 lib/mutant/reporter/cli/printer/env.rb
mutant-0.10.23 lib/mutant/reporter/cli/printer/env.rb
mutant-0.10.22 lib/mutant/reporter/cli/printer/env.rb
mutant-0.10.21 lib/mutant/reporter/cli/printer/env.rb
mutant-0.10.20 lib/mutant/reporter/cli/printer/env.rb
mutant-0.10.19 lib/mutant/reporter/cli/printer/env.rb
mutant-0.10.18 lib/mutant/reporter/cli/printer/env.rb
mutant-0.10.17 lib/mutant/reporter/cli/printer/env.rb
mutant-0.10.16 lib/mutant/reporter/cli/printer/env.rb
mutant-0.10.15 lib/mutant/reporter/cli/printer/env.rb
mutant-0.10.14 lib/mutant/reporter/cli/printer/env.rb
mutant-0.10.13 lib/mutant/reporter/cli/printer/env.rb
mutant-0.10.12 lib/mutant/reporter/cli/printer/env.rb
mutant-0.10.11 lib/mutant/reporter/cli/printer/env.rb
mutant-0.10.10 lib/mutant/reporter/cli/printer/env.rb
mutant-0.10.9 lib/mutant/reporter/cli/printer/env.rb
mutant-0.10.8 lib/mutant/reporter/cli/printer/env.rb
mutant-0.10.7 lib/mutant/reporter/cli/printer/env.rb
mutant-0.10.6 lib/mutant/reporter/cli/printer/env.rb
mutant-0.10.5 lib/mutant/reporter/cli/printer/env.rb