Class: Petitest::Tap::Texts::TestCaseText
- Inherits:
-
Object
- Object
- Petitest::Tap::Texts::TestCaseText
- Defined in:
- lib/petitest/tap/texts/test_case_text.rb
Constant Summary collapse
- NOT_OK =
"not ok"- OK =
"ok"- SKIP_DIRECTIVE =
" # SKIP"
Instance Method Summary collapse
-
#initialize(index:, test_case:) ⇒ TestCaseText
constructor
A new instance of TestCaseText.
- #to_s ⇒ Object
Constructor Details
#initialize(index:, test_case:) ⇒ TestCaseText
Returns a new instance of TestCaseText.
11 12 13 14 |
# File 'lib/petitest/tap/texts/test_case_text.rb', line 11 def initialize(index:, test_case:) @index = index @test_case = test_case end |
Instance Method Details
#to_s ⇒ Object
Note:
Override
17 18 19 20 21 |
# File 'lib/petitest/tap/texts/test_case_text.rb', line 17 def to_s string = "#{ok_or_not_ok} #{test_number} - #{description}" string += SKIP_DIRECTIVE if test_case.skipped? string end |