Forum: Ruby RubyGems - Tests fail on Gem install only

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
82e62c756d89bc6fa0a0a2d7f2b1e617?d=identicon&s=25 rosco (Guest)
on 2005-11-30 21:54
(Received via mailing list)
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/...)

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,
This topic is locked and can not be replied to.