GithubHelp home page GithubHelp logo

Comments (7)

colszowka avatar colszowka commented on May 19, 2024

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.

sferik avatar sferik commented on May 19, 2024

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.

colszowka avatar colszowka commented on May 19, 2024

Added unit tests that verify the correct fallback behaviour on 1.8.x. Closed by 48cbb2e

from simplecov.

colszowka avatar colszowka commented on May 19, 2024

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.

sferik avatar sferik commented on May 19, 2024

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.

colszowka avatar colszowka commented on May 19, 2024

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.

colszowka avatar colszowka commented on May 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.