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

Line coverage not getting recorded for controllers #2274

Open
vs37559 opened this issue Aug 24, 2023 · 0 comments
Open

Line coverage not getting recorded for controllers #2274

vs37559 opened this issue Aug 24, 2023 · 0 comments

Comments

@vs37559
Copy link

vs37559 commented Aug 24, 2023

Do you want to request a feature or report a bug?

Not sure if it's a bug but this is something I have came across when checking for line coverage in my Padrino application.

What is the current behavior?

I am using Ruby's Coverage module via coverband gem to check Line coverage for my application.
Whatever lines of code I have in my controller(s) seems to report zero coverage. The API is working absolutely fine and the consecutive methods resting under 'lib' directory are showing accurate coverage. It's just the lines within the controller, that are showing zero coverage.

During my debugging attempts, I found that Padrino uses Mustermann as routes' handler. Does that have something to do with it? It's wild guess, though!

What is the expected behavior?

When an API route is hit, the lines of code in the controller block (which is actually being executed) should show the coverage as per the default behavior of Ruby's Coverage module.

Which versions of Ruby, Padrino, Sinatra, Rack, OS are you using?

Ruby: v2.7.3
Padrino: v0.15.3
Sinatra: v2.2.4
Rack: v2.2.7
ActiveRecord: v5.1.1
OS: Ubuntu Linux

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