Skip to content

Commit 0b3a499

Browse files
Fix incompatibility with simplecov < 0.18
1 parent 61b771f commit 0b3a499

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/simplecov-lcov.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def format_file(file)
8787
pieces << "SF:#{filename}"
8888
pieces << format_lines(file)
8989

90-
if SimpleCov.branch_coverage?
90+
if SimpleCov.respond_to?(:branch_coverage?) && SimpleCov.branch_coverage?
9191
branch_data = format_branches(file)
9292
pieces << branch_data if branch_data.length > 0
9393
pieces << "BRF:#{file.total_branches.length}"

0 commit comments

Comments
 (0)