Class: Petitest::Texts::TestCaseResultCharacterText
- Defined in:
- lib/petitest/texts/test_case_result_character_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:) ⇒ TestCaseResultCharacterText
constructor
A new instance of TestCaseResultCharacterText.
- #to_s ⇒ Object
Constructor Details
#initialize(test_case:) ⇒ TestCaseResultCharacterText
Returns a new instance of TestCaseResultCharacterText.
10 11 12 |
# File 'lib/petitest/texts/test_case_result_character_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_character_text.rb', line 7 def test_case @test_case end |
Instance Method Details
#to_s ⇒ Object
Note:
Override
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/petitest/texts/test_case_result_character_text.rb', line 15 def to_s case when test_case.failed? colorize("F", :error) when test_case.skipped? colorize("*", :skip) else "." end end |