Class: Juniter::TestCase
Instance Method Summary collapse
- #all_results ⇒ Object
-
#result ⇒ Object
Convenience method.
Methods inherited from Element
Methods included from HasChildren
#assign_children_from_xml, #children_xml, included
Methods included from HasAttributes
#assign_attributes_from_xml, included, #xml_attributes
Instance Method Details
#all_results ⇒ Object
21 22 23 |
# File 'lib/juniter/test_case.rb', line 21 def all_results [ skip_result, *error_result, *fail_result ].compact end |
#result ⇒ Object
Convenience method. Assumes that all results are of the same type, which should mean that querying if the “result” is pass/fail/skip/error should work without issue.
28 29 30 |
# File 'lib/juniter/test_case.rb', line 28 def result all_results.none? ? TestResult.new(:pass) : all_results.first end |