I'm working on a small gem and included simplecov to spec_helper.rb
two lines:
require 'simplecov'
SimpleCov.start
When I run the rspec test, the simplecov seems started correctly but the report is not:
Finished in 0.00214 seconds
8 examples, 0 failures
Coverage report generated for /home/......
spec to /home/megas/Work/calc/coverage. 0 / 0 LOC (0.0%) covered.
What might be a problem and how to fix it? Thanks
SimpleCov is a code coverage analysis tool for Ruby.
Code Coverage Percentage = (Number of lines of code executed by a testing algorithm/Total number of lines of code in a system component) * 100.
Also make sure to enable simplecov (a.k.a. SimpleCov.start
) at the very beginning of your file; especially before you require your code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With