Gem::TestCase, deprecations and building gems during tests

Luis Lavena luislavena at
Sun Jun 10 00:49:58 UTC 2012

Hello folks,

I've been working on a RubyGems plugin called gem-compiler which
generate binary gems without modifying the gem source code

This gem is an extraction of a bigger and internal project and I'm
slicing it down and aiming to make it a good RubyGems citizen.

Part of this task is convert my massive internal specs into tests so I
can rely on Gem::TestCase and stay DRY, but I'm a bit overwhelm by all
the helpers defined in it.

There is quick_gem, util_gem, new_spec, util_build_gem, just to
mention a few on different combinations.

I'm a bit confused in which will fit better my needs:

* Need the path to a real gem file (.gem), it doesn't necessarily
needs to be installed.
* Need for change specification (platform and extensions).
* Need for add real files (extconf.rb or mkrf_conf.rb) inside the gem file.

Tried to look into existing RubyGems tests but is not concise which
method I should use (some tests are using things that TestCase marks
as future deprecation).

Hint on where to look at will be much appreciated.

Thank you in advance.
Luis Lavena
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

More information about the RubyGems-Developers mailing list