RubyGems - Tests fail on Gem install only

Discussion in 'Ruby' started by Ross Bamford, Nov 30, 2005.

  1. Ross Bamford

    Ross Bamford Guest

    Hi,

    I'm trying to package up a new version of my app's Gem, but am having a
    bit of a mindbending problem with installing the Gem, specifically running:

    gem install --test [package-base-name]

    (with the package in the same directory)

    performs the installation, but gives me 1 error on the unit-tests, which I
    wouldn't mind but they all pass when I run them from Rake, in the project.
    I tried also with testrb (all pass) and also with Rake in the unpacked
    installed Gem directory (again, all pass).

    I think I managed to track it down to a specific place in the code, which
    is the following (I'm pretty sure, but I couldn't find a way to get Gems
    to give an error backtrace for this - I just did some puts debugging):

    require 'rdoc/markup/simple_markup'
    require 'rdoc/markup/simple_markup/to_html'

    # ...

    p = SM::SimpleMarkup.new
    h = SM::ToHtml.new
    result = p.convert(result, h)

    (Extracted from
    http://rubyforge.org/cgi-bin/viewcvs.cgi/rote/lib/rote/page.rb?rev=1.5&cvsroot=rote)

    I put a begin/rescue around the failing test-case, and 'p'd the exception
    out, which gave me:

    #<RuntimeError: Unhandled special: Special: type=17, text="RDoc">

    As I say, this doesn't appear at all when running tests from Rake or with
    testrb, and RDoc rendering works fine the rest of the time. If anyone can
    shed any light, I'd be most grateful :)

    (Also, as an aside, should I be considering this a big problem? Is it
    common to run tests while installing a Gem, or do most people run them
    separately as needed? Also, does Gem keep error reports and so on from
    installations, for future reference?)

    Thanks in advance for any help,

    --
    Ross Bamford -
    Ross Bamford, Nov 30, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Trevor
    Replies:
    5
    Views:
    555
    Bill Kelly
    Jan 29, 2005
  2. Austin 7873
    Replies:
    5
    Views:
    176
    Eric Hodel
    Jan 27, 2007
  3. kazaam
    Replies:
    1
    Views:
    135
  4. Replies:
    5
    Views:
    238
  5. Rahul
    Replies:
    4
    Views:
    133
    Rahul
    Jul 22, 2009
Loading...

Share This Page