Class: OnlyofficeTestrailWrapper::ExampleFailedGotExpectedException
- Inherits:
-
Object
- Object
- OnlyofficeTestrailWrapper::ExampleFailedGotExpectedException
- Defined in:
- lib/onlyoffice_testrail_wrapper/testrail_helper/example_failed_got_expected_exception.rb
Overview
Class for exception then result contains ‘got` and `expected`
Instance Method Summary collapse
-
#comment ⇒ String
Comment for this exception.
-
#initialize(example) ⇒ ExampleFailedGotExpectedException
constructor
A new instance of ExampleFailedGotExpectedException.
-
#result ⇒ Symbol
Result of this exception.
Constructor Details
#initialize(example) ⇒ ExampleFailedGotExpectedException
Returns a new instance of ExampleFailedGotExpectedException.
6 7 8 |
# File 'lib/onlyoffice_testrail_wrapper/testrail_helper/example_failed_got_expected_exception.rb', line 6 def initialize(example) @example = example end |
Instance Method Details
#comment ⇒ String
Returns comment for this exception.
16 17 18 19 20 21 22 23 24 |
# File 'lib/onlyoffice_testrail_wrapper/testrail_helper/example_failed_got_expected_exception.rb', line 16 def comment return @comment if @comment failed_line = RspecHelper.find_failed_line(@example) @comment = "\n#{@example.exception .to_s .gsub('got:', "got:\n") .gsub('expected:', "expected:\n")}\nIn line:\n#{failed_line}" end |
#result ⇒ Symbol
Returns result of this exception.
11 12 13 |
# File 'lib/onlyoffice_testrail_wrapper/testrail_helper/example_failed_got_expected_exception.rb', line 11 def result :failed end |