Class: MinitestBender::Results::Expectation
- Defined in:
- lib/minitest-bender/results/expectation.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes inherited from Base
Instance Method Summary collapse
- #formatted_number(_sorted_siblings = nil) ⇒ Object
-
#initialize(minitest_result, number, name) ⇒ Expectation
constructor
A new instance of Expectation.
- #number_sort_key ⇒ Object
Methods inherited from Base
#context, #file_path, #formatted_label, #formatted_label_and_time, #formatted_message, #formatted_name_with_context, #formatted_time, #name_sort_key, #rerun_line, #source_line_number, #source_location, #time_with_unit_and_padding_right, #to_icon
Constructor Details
#initialize(minitest_result, number, name) ⇒ Expectation
Returns a new instance of Expectation.
6 7 8 9 10 |
# File 'lib/minitest-bender/results/expectation.rb', line 6 def initialize(minitest_result, number, name) super(minitest_result) @number = number @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/minitest-bender/results/expectation.rb', line 4 def name @name end |
Instance Method Details
#formatted_number(_sorted_siblings = nil) ⇒ Object
12 13 14 |
# File 'lib/minitest-bender/results/expectation.rb', line 12 def formatted_number(_sorted_siblings = nil) " #{Colorizer.colorize(number, :number)} " end |
#number_sort_key ⇒ Object
16 17 18 |
# File 'lib/minitest-bender/results/expectation.rb', line 16 def number_sort_key @number_sort_key ||= number.to_i end |