Comments (7)
This shouldn't fail, and in fact there is a mechanism that keeps Simplecov from executing on 1.8 Rubies. I'll have a look as to why this still could've happened, thanks for the report
from simplecov.
Thanks for looking into it. You should be able to reproduce with:
git clone git://github.com/jnunemaker/twitter.git
cd twitter
bundle install
bundle exec rake spec
I was using Ruby 1.8.6 patchlevel 399.
from simplecov.
Added unit tests that verify the correct fallback behaviour on 1.8.x. Closed by 48cbb2e
from simplecov.
OK, I finally had the time to look into this. I've identified the problem and solved it (the trouble was that SimpleCov.configure did not have a fallback for non-1.9-Ruby)
The actual commit holding the fix is SHA: a7b582a
Along the way I've also added facilities to test SimpleCov on multiple Ruby versions, so the unit tests now verify that loading SimpleCov on 1.8-Rubies does not make everything go down the drain.
Thanks for the patience, please let me know whether this works for you, the release of version 0.3.8 starts as soon as this comment is submitted.
from simplecov.
I upgraded to 0.3.8. Now I'm getting
uninitialized constant SimpleCov::VERSION (NameError)
Here the full trace: https://gist.github.com/225c67bef97a37a146f7
from simplecov.
SHIT!
That's caused by the migration from Jeweler to Bundler and did not bump up in the tests since I'm loading bundler there. 0.3.9 is pushed, yanking 0.3.8 in a minute!
from simplecov.
OK, I've tried it with the twitter gem, and coverage is correctly skipped for 1.8.7 and generated for 1.9.2 with simplecov 0.3.9. Sorry for messing up that 0.3.8 release!
However, on 1.8.6, the twitter gem's test suite is failing, but not due to Simplecov. Here's the top of the stack trace:
/Users/colszowka/.rvm/gems/ruby-1.8.6-p399/gems/rack-1.2.1/lib/rack/utils.rb:138:in `union': can't convert Array into String (TypeError)
from /Users/colszowka/.rvm/gems/ruby-1.8.6-p399/gems/rack-1.2.1/lib/rack/utils.rb:138
from /Users/colszowka/.rvm/gems/ruby-1.8.6-p399/gems/faraday-0.5.3/lib/faraday/utils.rb:1:in `require'
When I uncommented the simplecov setup in the spec helper, the same exception occured, so it obviously is a problem with the twitter gem itself.
Luckily for me though, this seems to prove that simplecov fires up on 1.8.6 without trouble, since the actual loading of the library has been reached :)
Here's how I fired up the test suite after git clone:
rvm 1.8.6,1.8.7,1.9.2 exec bundle install
rvm 1.8.6,1.8.7,1.9.2 rake spec
from simplecov.
Related Issues (20)
- branch coverage data missing after collating .resultset.json in parallel test HOT 2
- allow skipping (unreachable) branch coverage only HOT 10
- option to disable line warnings with `enable_coverage_for_eval` and rails views HOT 3
- Use of ractors makes coverage non-deterministic HOT 3
- Branch coverage for the files which don't have _spec files
- "Coverage report generated" is being written to the stdout stream
- Default configurations around coverage criteria and minimum coverage
- Minor documentation fix
- [Feature Request] Don't require all branches to be covered twice in ensure-blocks HOT 3
- Support for other Parallel Testing gems
- SimpleCov does not fail for low coverage for parallel_tests when using 1 process
- SimpleCov only reports the last controller test and sets to 0.0% all previous results HOT 1
- False positives for `begin` lines, a constant definition, and some heredoc content
- مشکل <3
- Rails 7.1 update => test coverage drop HOT 6
- Coverage changes after each run HOT 1
- 0.22.0 release is missing on GitHub
- Coverage dropped in Rails 7.1 (fixed) HOT 1
- Bad usability on bigger projects (>1000s files)
- README says SimpleCov.start should be called after SimpleCov.at_fork, is it true? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simplecov.