[Rubygems-developers] Failing to test gem on install

Gavin Sinclair gsinclair at soyabean.com.au
Mon Jul 19 18:19:01 EDT 2004

On Tuesday, July 20, 2004, 2:32:01 AM, Jim wrote:

>> Right.  Though, you wouldn't necessarily have to require all of the
>> project's unit tests in that single file.  You could calculate and define
>> them in any way you like.  They could all even be in the one file if it
>> were a small project.  I like the singlular version as a shortcut.  I'm
>> guessing that there will be a lot of people who will use either way.

> Looks good.  Regarding singular/plural:  We should either support
> singular/plural whereever it makes sense, or support it nowhere.

> Other things that should be specified, but probably don't need options for:

> * When the test cases are run, the current directory should be the base of
> the gem directory.  This allows test code to reliably find test data and
> whatnot without specifying an absolute path or doing fancy calculates.  I
> see no need for an option to change this.

> * The current directory (".") should be in the load path.  I think this is
> the default in all the ruby installs I've seen, but perhaps we need to
> insure this.

> * Any require_paths specified in the Gem spec are in the load path.

> I think the above conditions are reasonable starting conditins for any
> test suites.  They need to be clearly stated so that developers know they
> can depend on the conditions.  If someone needs something that doesn't fit
> into the above, then they can provide a suite file that modifies the
> environment as they see fit, and put that suite_file in test_file.

Nice work, Jim.  Once the above points are agreed on (added to?), I
suppose it is sufficient to document these specs in the "Notes"
section of the gemspec reference.  This attribute carries more doco
requirements than most others, because it specifies not only what it
means, but what a RubyGems-compliant UI must do.

When someone writes a GUI front-end, they need to ensure compliance
with these specs.  There's nothing worse than unit testing in an
unknown environment :)


P.S. I'll (try to remember to) review all the attributes to work out a
list of possible "singular shortcuts".  Or an interested reader can
visit http://rubygems.rubyforge.org/wiki/wiki.pl?GemspecReference and
do it themselves.

More information about the Rubygems-developers mailing list