puppetlabs/puppetlabs_spec_helper — pull request #46 by wcooley (2014-01-24 07:20:24+00:00)
Title: Add support for "forge_modules" in fixtures.

* This adds a new *forge_modules* category, similar to *repositories*,
it can be given as a simple string argument, or with a hash to specify
version.

* I have done local testing, but I'm not sure how feasible it is to
write unit tests for something like this. (There seem to not be any for
existing rake tests.)

* I ignore dependencies when installing fixture modules. Since we don't
clean directories that are not expressly listed, we shouldn't install
dependencies because they won't be cleaned up. Besides, it's probably
better to have to be explicit about your chain of dependencies.

* "repo" and "ref" don't really work as well as for git repos, but
renaming them is outside the scope of this change and I didn't really
want to make it any more complicated than necessary.

* I see the direct uses of the module face in the `build` task, but the
`build` task doesn't work for me (ironically enough, it seems like some
of initialization that this gem supplies needs to be done):

Could not autoload puppet/face/module/install: Error converting value for param 'modulepath': Could not find value for $confdir

In fact, this happens when I do the same thing w/irb:

irb(main):001:0> require 'puppet/face'
=> true
irb(main):002:0> pmod = Puppet::Face['module', :current]
Puppet::Error: Could not autoload puppet/face/module/install: Error converting value for param 'modulepath': Could not find value for $confdir

... so I'm just shelling out to 'puppet module install' directly.