Class: Inferno::ResultSummarizer
- Inherits:
-
Object
- Object
- Inferno::ResultSummarizer
- Defined in:
- lib/inferno/result_summarizer.rb
Overview
This class takes an array of results and determines the overall result. This is used to determine the result of a TestGroup/TestSuite based on the results of it’s children.
Instance Attribute Summary collapse
-
#results ⇒ Object
readonly
Returns the value of attribute results.
Instance Method Summary collapse
-
#initialize(results) ⇒ ResultSummarizer
constructor
A new instance of ResultSummarizer.
- #summarize ⇒ Object
Constructor Details
#initialize(results) ⇒ ResultSummarizer
Returns a new instance of ResultSummarizer.
10 11 12 |
# File 'lib/inferno/result_summarizer.rb', line 10 def initialize(results) @results = results.is_a?(ResultCollection) ? results : ResultCollection.new(results) end |
Instance Attribute Details
#results ⇒ Object (readonly)
Returns the value of attribute results.
8 9 10 |
# File 'lib/inferno/result_summarizer.rb', line 8 def results @results end |
Instance Method Details
#summarize ⇒ Object
14 15 16 17 18 |
# File 'lib/inferno/result_summarizer.rb', line 14 def summarize return 'pass' if optional_results_passing_criteria_met? prioritized_result_strings.find { |result_string| unique_result_strings.include? result_string } end |