markbates / markbates/cover_me

Class "end" marked as not executed

Open
#36 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
203
Forks
17
PR merge metrics
No merged PRs in 30d

Description

```
1: class ApplicationController < ActionController::Base 21
2: protect_from_forgery 21
3:
4: rescue_from CanCan::AccessDenied do |exception| 8
5: redirect_to root_path, :alert => t('auth.not_permitted') 5
6: end 1
7: end 0
```

With this being such a small file, it then appears in red as it is reported as 83.3% tested due to the class end not being counted as executed.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the report with the ApplicationController snippet shown in the issue, then trace how coverage is calculated for the final class and block lines. Done means the closing class line is not treated as an unexecuted statement or does not incorrectly reduce the reported percentage; no source file or test is named in the payload.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.