Sha256: 80c5c7d3a5fff83f61588c0614aaaed2b1304cf2d64c0365d0e665ccad2a3cd4
Contents?: true
Size: 933 Bytes
Versions: 59
Compression:
Stored size: 933 Bytes
Contents
module Inferno # @private # 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. class ResultSummarizer attr_reader :results def initialize(results) @results = results end def summarize prioritized_result_strings.find { |result_string| unique_result_strings.include? result_string } end private def prioritized_result_strings Entities::Result::RESULT_OPTIONS end def required_results @required_results ||= results.select(&:required?) end def all_optional_results? required_results.blank? end def results_for_summary all_optional_results? ? results : required_results end def unique_result_strings @unique_result_strings ||= results_for_summary.map(&:result).uniq end end end
Version data entries
59 entries across 59 versions & 1 rubygems