Class: MinitestBender::Recorders::GroupedIcons
- Inherits:
-
Object
- Object
- MinitestBender::Recorders::GroupedIcons
- Defined in:
- lib/minitest-bender/recorders/grouped_icons.rb
Instance Method Summary collapse
-
#initialize(io) ⇒ GroupedIcons
constructor
A new instance of GroupedIcons.
- #print_context(result_context) ⇒ Object
- #print_context_with_results(_result_context, _results) ⇒ Object
- #print_result(result) ⇒ Object
Constructor Details
#initialize(io) ⇒ GroupedIcons
Returns a new instance of GroupedIcons.
4 5 6 |
# File 'lib/minitest-bender/recorders/grouped_icons.rb', line 4 def initialize(io) @printer = Printers::Plain.new(io) end |
Instance Method Details
#print_context(result_context) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/minitest-bender/recorders/grouped_icons.rb', line 8 def print_context(result_context) printer.print_line context_path = result_context.path context_separator = result_context.separator prefix = result_context.prefix path = context_path[0...-1].join(context_separator) path << context_separator unless path.empty? klass = context_path.last printer.print("#{prefix}#{path}#{Colorizer.colorize(klass, :normal, :bold)} ") end |
#print_context_with_results(_result_context, _results) ⇒ Object
27 28 29 |
# File 'lib/minitest-bender/recorders/grouped_icons.rb', line 27 def print_context_with_results(_result_context, _results) # do_nothing end |
#print_result(result) ⇒ Object
22 23 24 25 |
# File 'lib/minitest-bender/recorders/grouped_icons.rb', line 22 def print_result(result) printer.print(result.to_icon) printer.advance end |