Class: Petitest::Texts::TestCaseResultLineText
- Defined in:
- lib/petitest/texts/test_case_result_line_text.rb
Constant Summary
Constants inherited from BaseText
BaseText::ANSI_COLOR_CODE_BY_COLOR_TYPE
Instance Attribute Summary collapse
- #test_case ⇒ Petitest::TestCase readonly
Instance Method Summary collapse
-
#initialize(test_case:) ⇒ TestCaseResultLineText
constructor
A new instance of TestCaseResultLineText.
- #to_s ⇒ Object
Constructor Details
#initialize(test_case:) ⇒ TestCaseResultLineText
Returns a new instance of TestCaseResultLineText.
10 11 12 |
# File 'lib/petitest/texts/test_case_result_line_text.rb', line 10 def initialize(test_case:) @test_case = test_case end |
Instance Attribute Details
#test_case ⇒ Petitest::TestCase (readonly)
7 8 9 |
# File 'lib/petitest/texts/test_case_result_line_text.rb', line 7 def test_case @test_case end |
Instance Method Details
#to_s ⇒ Object
Note:
Override
15 16 17 18 19 20 |
# File 'lib/petitest/texts/test_case_result_line_text.rb', line 15 def to_s indent( colorize("##{test_case.test_method.method_name}", color_type), 2 * (test_case.test_group_class.nest_level + 1), ) end |