module Scan class TestResultParser def parse_result(output) # e.g. ...... matched = output.match(%r{\}) if matched and matched.length == 3 tests = matched[1].to_i failures = matched[2].to_i return { tests: tests, failures: failures } else Helper.log.error "Couldn't parse the number of tests from the output".red return {} end end end end