Method: Tapout::Reporters::Abstract#count_tally
- Defined in:
- lib/tapout/reporters/abstract.rb
#count_tally(entry) ⇒ Array<Integer>
Return the total counts given a tally or final entry.
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 |
# File 'lib/tapout/reporters/abstract.rb', line 199 def count_tally(entry) total = @passed.size + @failed.size + @raised.size + @skipped.size + @omitted.size total = entry['counts']['total'] || total if counts = entry['counts'] pass = counts['pass'] || @passed.size fail = counts['fail'] || @failed.size error = counts['error'] || @raised.size todo = counts['todo'] || @skipped.size omit = counts['omit'] || @omitted.size else pass, fail, error, todo, omit = *[@passed, @failed, @raised, @skipped, @omitted].map{ |e| e.size } end return total, pass, fail, error, todo, omit end |