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

"end" is being reported as not covered.. #443

Closed
sblackstone opened this issue Jan 7, 2016 · 5 comments
Closed

"end" is being reported as not covered.. #443

sblackstone opened this issue Jan 7, 2016 · 5 comments

Comments

@sblackstone
Copy link

Ruby 2.2.3 and 2.3.0

jack: sblackstone$ grep simplecov Gemfile.lock
    simplecov (0.11.1)
      simplecov-html (~> 0.10.0)
    simplecov-html (0.10.0)
  simplecov

simpecov_issue

But I don't see anything weird about the file that would cause this:

jack: sblackstone$ cat app/models/click.rb |od -ch
0000000    c   l   a   s   s       C   l   i   c   k       <       A   c
             6c63    7361    2073    6c43    6369    206b    203c    6341
0000020    t   i   v   e   R   e   c   o   r   d   :   :   B   a   s   e
             6974    6576    6552    6f63    6472    3a3a    6142    6573
0000040   \n           b   e   l   o   n   g   s   _   t   o       :   u
             200a    6220    6c65    6e6f    7367    745f    206f    753a
0000060    s   e   r  \n           b   e   l   o   n   g   s   _   t   o
             6573    0a72    2020    6562    6f6c    676e    5f73    6f74
0000100        :   c   a   m   p   a   i   g   n  \n           b   e   l
             3a20    6163    706d    6961    6e67    200a    6220    6c65
0000120    o   n   g   s   _   t   o       :   a   f   f   i   l   i   a
             6e6f    7367    745f    206f    613a    6666    6c69    6169
0000140    t   e  \n           b   e   l   o   n   g   s   _   t   o
             6574    200a    6220    6c65    6e6f    7367    745f    206f
0000160    :   a   f   f   i   l   i   a   t   e   _   c   o   n   t   a
             613a    6666    6c69    6169    6574    635f    6e6f    6174
0000200    c   t  \n           h   a   s   _   o   n   e       :   r   e
             7463    200a    6820    7361    6f5f    656e    3a20    6572
0000220    f   e   r   r   a   l  \n   e   n   d  \n
             6566    7272    6c61    650a    646e    000a
0000233
@ksmurphy
Copy link

ksmurphy commented Jan 8, 2016

Your problem may be related to this issue: #444

This impacts not only blank lines, but any lines with no executable code on them. Are you merging multiple outputs from simplecov?

@sblackstone
Copy link
Author

@ksmurphy no - only have the first line of test_helper.rb as SimpleCov.start 'rails' and everything else is out-of-the-box.

I was just working on another new project and everything was reporting 100% and suddenly within my last couple patches, I started seeing this same bug again in the new project.

@sblackstone
Copy link
Author

Update: It was occuring when I forgot to do rvm use 2.3.0.

My system ruby was 2.0.0p481 and it seems to occur when run from there.

@BandanaPandey
Copy link

@sblackstone I m also using Ruby 2.3.0 and simplecov 0.11.2.
In my case there is no such problem as end is covered in my simplecov coverage.
I have included following in my Gemfile::
gem "simplecov", "> 0.11.1", :require => false
And, my Gemfile.lock I have ::
simplecov (0.11.2)
simplecov-html (
> 0.10.0)
simplecov-html (0.10.0)

@PragTob
Copy link
Collaborator

PragTob commented Feb 4, 2017

If it occured with some patch level of ruby 2.0.0 it might have been an old simplecov version or a temporary bug in the coverage library. The tests here test plenty of simple cases such as this one so I'll close this out.

Should this error occur again, please let us know :)

@PragTob PragTob closed this as completed Feb 4, 2017
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

4 participants