Sha256: 223cbccb57ab174cd3d7021434a4d1389120c2ed5aae4e2f42945d68d9695ec6
Contents?: true
Size: 454 Bytes
Versions: 24
Compression:
Stored size: 454 Bytes
Contents
module StartingBlocks class ResultParser def parse(text) { tests: get_count_of('tests', text), assertions: get_count_of('assertions', text), failures: get_count_of('failures', text), errors: get_count_of('errors', text), skips: get_count_of('skips', text) } end def get_count_of name, text text.scan(/(\d+ #{name})/)[-1][0].split(' ')[0].to_i rescue 0 end end end
Version data entries
24 entries across 24 versions & 1 rubygems