I've been doing my periodic check-in w/ turbo_tests2 and simplecov v1 rcs - really loving the progress I'm seeing!
I have found an odd behaviour with method coverage not reporting some methods as covered when used with turbo_tests2, but they are with rspec - while I'm not sure in what gem that issue lies, in trying to reproduce it in my reproduction repository I believe I have found a bug in simplecov that might be the actual issue.
In a nutshell it seems that something in the method coverage code is mixing up methods with the same name i.e. G-Rath/simplecov-wat@cc71b05 adds methods add3 and substract3 in a new file (math/math3.rb) which are fully covered by spec/math/math3_spec.rb, while also adding a different version of add3 to math/add.rb which is not covered.
Running with turbo_tests2 reports both line and method coverage as below 100%:
Coverage report generated for rspec-1, rspec-2, rspec-3, rspec-4 to coverage/index.html
Line coverage: 25 / 26 (96.15%)
Branch coverage: 24 / 24 (100.00%)
Method coverage: 5 / 6 (83.33%)
Line coverage (96.15%) is below the expected minimum coverage (100.00%).
Lowest-coverage files (line):
87.50% math/add.rb
100.00% math/divide.rb
100.00% math/math3.rb
100.00% math/subtract.rb
Method coverage (83.33%) is below the expected minimum coverage (100.00%).
Lowest-coverage files (method):
50.00% math/add.rb
100.00% math/divide.rb
100.00% math/math3.rb
100.00% math/subtract.rb
SimpleCov failed with exit 2 due to a coverage related error
However, running with rspec reports only line coverage as below 100%, and that there are only 5 methods instead of 6:
Coverage report generated for RSpec to coverage/index.html
Line coverage: 25 / 26 (96.15%)
Branch coverage: 24 / 24 (100.00%)
Method coverage: 5 / 5 (100.00%)
Line coverage (96.15%) is below the expected minimum coverage (100.00%).
Lowest-coverage files (line):
87.50% math/add.rb
100.00% math/divide.rb
100.00% math/math3.rb
100.00% math/subtract.rb
SimpleCov failed with exit 2 due to a coverage related error
I've been doing my periodic check-in w/
turbo_tests2andsimplecovv1 rcs - really loving the progress I'm seeing!I have found an odd behaviour with method coverage not reporting some methods as covered when used with
turbo_tests2, but they are withrspec- while I'm not sure in what gem that issue lies, in trying to reproduce it in my reproduction repository I believe I have found a bug insimplecovthat might be the actual issue.In a nutshell it seems that something in the method coverage code is mixing up methods with the same name i.e. G-Rath/simplecov-wat@cc71b05 adds methods
add3andsubstract3in a new file (math/math3.rb) which are fully covered byspec/math/math3_spec.rb, while also adding a different version ofadd3tomath/add.rbwhich is not covered.Running with
turbo_tests2reports both line and method coverage as below 100%:However, running with
rspecreports only line coverage as below 100%, and that there are only 5 methods instead of 6: