Skip to content

Commit

Permalink
Don't combine branches if branch coverage not enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez committed Jan 14, 2020
1 parent 9c60411 commit 93c771d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/simplecov/combine/files_combiner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ module FilesCombiner
# @return [Hash]
#
def combine(coverage_a, coverage_b)
{
lines: Combine.combine(LinesCombiner, coverage_a[:lines], coverage_b[:lines]),
branches: Combine.combine(BranchesCombiner, coverage_a[:branches], coverage_b[:branches])
}
combination = {lines: Combine.combine(LinesCombiner, coverage_a[:lines], coverage_b[:lines])}
combination[:branches] = Combine.combine(BranchesCombiner, coverage_a[:branches], coverage_b[:branches]) if SimpleCov.branch_coverage?
combination
end
end
end
Expand Down

0 comments on commit 93c771d

Please sign in to comment.