Are test files documentation?

Mamoru Tasaka mtasaka at
Wed Aug 11 15:26:08 UTC 2010

Michael Stahnke wrote, at 08/12/2010 12:10 AM +9:00:
> I certainly wouldn't want to remove tests or specs from packages.
> They often contain the best examples of how to use a specific gem.
> Making them all into a separate package for -doc seems like it would
> create a lot more packages, and I can't think of many situations where
> I wouldn't want to install the primary and doc package, as gem itself
> does.

Generally I want to install only the files which are actually needed,
and want to check which is really needed.

Also in many cases gems rpms are needed for dependency issue only
(i.e. actually to run some application, like alexandria or fantastic
  which I maintain). In such cases people don't want to install such
"unneeded" files.

And, while one gem base rpm itself may be small, usually tests/
or spec/ directory have compatible size compared to lib/ + bin/
directory, and with generated ri/rdoc files the size of total
"documentation" files usually becomes larger than that of the files
needed for runtime.

So IMO splitting tests/ spec/ directories + generated
ri/rdoc files into -doc subpackge is preferred and I have always requested
so. Only "developers" will want to install such files ("usual" people
don't want to install "-devel" package for running applications).

> You can tell gem not to install ri/rdoc
... when installing gem by themselves. When creating gem based rpm,
we usually create ri/rdoc (from rubygems 1.3.5+).

> but spec/test is still
> there.  Marking them as %doc seems reasonable.

> stahnma


More information about the ruby-sig mailing list