rspec-circleci-coverage 0.1.115 → 0.1.547
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rspec/circleci/coverage.rb +5 -14
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c5bbd8eab02b5adf1c557a904167e0dfcf0710b65e7d7415386677ed6f652212
|
|
4
|
+
data.tar.gz: 60268440fafc4c52434084db4f13ccb4908c2dc60e306d5eaea24abad768e561
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 88ebd58e035311667f002f56a067b47ddcf0a810d6a5ed98523e993796fcb2010b15612787fab921355e7978349b749a9da3dd61cb94c29e8c4fc425b977c2b9
|
|
7
|
+
data.tar.gz: ab1a40f1ddc948b49ffb8a11e60d7f0c4d89d04804b35eb58184cc53fbe27b6e859bcbdce38afbf4ec7aa8933609a0794ddbdf0704316dbc38017e5106c64311
|
|
@@ -78,25 +78,16 @@ module RSpec
|
|
|
78
78
|
|
|
79
79
|
before_lines = extract_lines(@before_coverage[file])
|
|
80
80
|
|
|
81
|
-
#
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
next if count.nil?
|
|
81
|
+
# Any line whose count increased means this test executed the file.
|
|
82
|
+
executed = lines.each_with_index.any? do |count, index|
|
|
83
|
+
next false if count.nil?
|
|
85
84
|
# Treat a missing before-count as 0 so the first render of an
|
|
86
85
|
# eval'd file (e.g. a compiled template) is attributed to this test.
|
|
87
86
|
before_count = before_lines ? (before_lines[index] || 0) : 0
|
|
88
|
-
|
|
89
|
-
# Line was executed if count increased
|
|
90
|
-
if count > before_count
|
|
91
|
-
executed_lines << (index + 1) # Line numbers are 1-indexed
|
|
92
|
-
end
|
|
87
|
+
count > before_count
|
|
93
88
|
end
|
|
94
89
|
|
|
95
|
-
|
|
96
|
-
if executed_lines.any?
|
|
97
|
-
relative_file = relative_path(file)
|
|
98
|
-
@coverage_data[relative_file][test_key] = executed_lines
|
|
99
|
-
end
|
|
90
|
+
@coverage_data[relative_path(file)][test_key] = true if executed
|
|
100
91
|
end
|
|
101
92
|
end
|
|
102
93
|
|