Class: Juniter::TestCase

Inherits:
Element show all
Defined in:
lib/juniter/test_case.rb

Instance Method Summary collapse

Methods inherited from Element

from_xml, tag, #to_xml

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_resultsObject



21
22
23
# File 'lib/juniter/test_case.rb', line 21

def all_results
  [ skip_result, *error_result, *fail_result ].compact
end

#resultObject

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