R
Ross Bamford
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,
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,