Class: MinitestBender::Recorders::ProgressVerbose

Inherits:
Object
  • Object
show all
Defined in:
lib/minitest-bender/recorders/progress_verbose.rb

Instance Method Summary collapse

Constructor Details

#initialize(io, total_tests_count) ⇒ ProgressVerbose

Returns a new instance of ProgressVerbose.



4
5
6
# File 'lib/minitest-bender/recorders/progress_verbose.rb', line 4

def initialize(io, total_tests_count)
  @printer = Printers::WithProgressBar.new(io, total_tests_count)
end

Instance Method Details



8
9
10
11
# File 'lib/minitest-bender/recorders/progress_verbose.rb', line 8

def print_context(result_context)
  printer.print_line
  printer.print_line(Colorizer.colorize(result_context.with_prefix, :normal, :bold))
end


21
22
23
# File 'lib/minitest-bender/recorders/progress_verbose.rb', line 21

def print_context_with_results(_result_context, _results)
  # do_nothing
end


13
14
15
16
17
18
19
# File 'lib/minitest-bender/recorders/progress_verbose.rb', line 13

def print_result(result)
  printer.print_line(result_line(result))
  lines = result.state.detail_lines_without_header(result)
  padded_lines = lines.map { |line| "  #{line}" }
  printer.print_lines(padded_lines)
  printer.advance
end