colszowka/simplecov — pull request #128 by japgolly (2012-05-04 23:39:13+00:00)
Title: Prevent divisions by zero

There are a few cases where divisions by zero were possible.
When the happens the HTML reporter fails like this:

```
def covered_strength
return 0 if lines.length == 0 or lines.length == never_lines.count
lines_strength = 0
lines.each do |c|
lines_strength += c.coverage if c.coverage
end
effective_lines_count = (lines.count - never_lines.count - skipped_lines.count).to_f
strength = lines_strength / effective_lines_count
round_float(strength, 1)
end
```

Considered writing test cases for this but decided it's not worth it.
All existing tests pass with this fix.