We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 82f385b commit 8e87a70Copy full SHA for 8e87a70
1 file changed
storefront/lib/testing_support/coverage.rb
@@ -12,6 +12,23 @@
12
SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter
13
end
14
15
+ def (SimpleCov::ResultAdapter).call(result)
16
+ result = result.transform_keys do |path|
17
+ template_path = path.sub(
18
+ "#{SimpleCov.root}/",
19
+ "#{SimpleCov.root}/../storefront/templates/"
20
+ )
21
+ File.exist?(template_path) ? template_path : path
22
+ end
23
+ result.each do |path, coverage|
24
+ next unless path.end_with?(".erb")
25
+
26
+ # Remove the extra trailing lines added by ERB
27
+ coverage[:lines] = coverage[:lines][...File.read(path).lines.size]
28
29
+ result
30
31
32
SimpleCov.command_name("solidus:storefront")
33
SimpleCov.merge_timeout(3600)
34
SimpleCov.start("rails")
0 commit comments