Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.0% coverage on basic test #1028

Open
dslik opened this issue Sep 7, 2022 · 0 comments
Open

0.0% coverage on basic test #1028

dslik opened this issue Sep 7, 2022 · 0 comments

Comments

@dslik
Copy link

dslik commented Sep 7, 2022

Greetings. Working on updating some OLD scripts that used rcov, and I'm running in some difficulties getting coverage output.

I have simplecov-0.21.2 installed, and I'm running ruby 2.6.8p205 (2021-07-07 revision 67951) [universal.x86_64-darwin21]

I don't have anything else installed for this test, and I'm not using a test framework, just running the ruby script from the command line directly.

Here's the minimalist ruby file I'm using to test:

require 'simplecov'

SimpleCov.start
SimpleCov.command_name "ruby"

=begin
This is a block comment
=end

print "Hello World\n\n"
return

This returns "No data available in table".

image

When I replace SimpleCov.start with the following:

SimpleCov.start do
    track_files "*.rb"
end

I get "0 / 10 LOC (0.0%) covered."

image

Every line is included as not being covered, including the text within the block comment:

image

I tried adding @filters = [] as suggested in issue #77, but no change.

Perhaps someone can point me to what I'm doing wrong?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant