Class: MinitestBender::States::Skipped

Inherits:
Base
  • Object
show all
Defined in:
lib/minitest-bender/states/skipped.rb

Constant Summary collapse

COLOR =
:skip
LABEL =
'SKIPPED'
GROUP_LABEL =
'SKIPS'
ICON =
'○'

Instance Attribute Summary

Attributes inherited from Base

#results

Instance Method Summary collapse

Methods inherited from Base

#add_result, #color, #colored_icon, #colored_icon_with_context_count, #colored_icon_with_count, #detail_lines, #detail_lines_without_header, #formatted_group_label, #formatted_label, #initialize, #print_details, #test_location

Constructor Details

This class inherits a constructor from MinitestBender::States::Base

Instance Method Details

#formatted_message(result) ⇒ Object



12
13
14
# File 'lib/minitest-bender/states/skipped.rb', line 12

def formatted_message(result)
  colored(Utils.first_line(result.failures[0].message))
end

#summary_messageObject



16
17
18
19
20
21
# File 'lib/minitest-bender/states/skipped.rb', line 16

def summary_message
  return '' if results.empty?
  skipped_count = results.size
  auxiliary_verb = skipped_count == 1 ? 'was' : 'were'
  colored("#{skipped_count} #{auxiliary_verb} skipped")
end