Module: OnlyofficeTcmHelper::PendingHelper
- Included in:
- TcmHelper
- Defined in:
- lib/onlyoffice_tcm_helper/helpers/pending_helper.rb
Overview
module with methods for parsing test results
Instance Method Summary collapse
-
#handle_pending(example) ⇒ Symbol
Handle pending information.
-
#passed_pending_message ⇒ String
Message if pending passed.
-
#pending_passed?(exception) ⇒ Boolean
Check if pending example passed This situation is incorrect - if pending is passing for some reason This pending comment should be removed and investigate.
-
#pending_status(exception) ⇒ Symbol
Get pending status by it’s comment.
Instance Method Details
#handle_pending(example) ⇒ Symbol
Handle pending information
35 36 37 38 39 40 |
# File 'lib/onlyoffice_tcm_helper/helpers/pending_helper.rb', line 35 def handle_pending(example) @comment = example.execution_result. exception = example.exception.to_s pending_status(exception) end |
#passed_pending_message ⇒ String
Returns Message if pending passed.
7 8 9 |
# File 'lib/onlyoffice_tcm_helper/helpers/pending_helper.rb', line 7 def 'Expected example to fail since it is pending, but it passed' end |
#pending_passed?(exception) ⇒ Boolean
Check if pending example passed This situation is incorrect - if pending is passing for some reason This pending comment should be removed and investigate
16 17 18 |
# File 'lib/onlyoffice_tcm_helper/helpers/pending_helper.rb', line 16 def pending_passed?(exception) exception.start_with?() end |
#pending_status(exception) ⇒ Symbol
Get pending status by it’s comment
23 24 25 26 27 28 29 30 |
# File 'lib/onlyoffice_tcm_helper/helpers/pending_helper.rb', line 23 def pending_status(exception) if pending_passed?(exception) @comment = "#{}\nOriginal Pending:\n#{@comment}" :failed else :pending end end |