(#13289) Change test scaffolding to use a module & manifest dir fixture path

This removes the need for depending on a global site.pp, and depending on the
checked out apt module to be called 'apt' as well.

It pulls in stdlib via sub-modules as I don't have a better way to deal with
dependencies yet. It has pinned the revision for stdlib to 2.2.1 which is the
minimum required version for apt to work.
This commit is contained in:
Ken Barber 2012-03-21 13:21:50 +00:00
vanhempi a758247f26
commit 0ea4ffa9a2
5 muutettua tiedostoa jossa 10 lisäystä ja 2 poistoa

3
.gitmodules vendored Tavallinen tiedosto
Näytä tiedosto

@ -0,0 +1,3 @@
[submodule "spec/fixtures/modules/stdlib"]
path = spec/fixtures/modules/stdlib
url = https://github.com/puppetlabs/puppetlabs-stdlib.git

0
spec/fixtures/manifests/site.pp vendored Tavallinen tiedosto
Näytä tiedosto

1
spec/fixtures/modules/apt vendored Symbolinen linkki
Näytä tiedosto

@ -0,0 +1 @@
../../../

1
spec/fixtures/modules/stdlib vendored Submodule

@ -0,0 +1 @@
Subproject commit a70b09d5de035de5254ebe6ad6e1519a6d7cf588

Näytä tiedosto

@ -1,11 +1,14 @@
require 'puppet'
require 'rubygems'
require 'puppet'
require 'rspec-puppet'
def param_value(subject, type, title, param)
subject.resource(type, title).send(:parameters)[param.to_sym]
end
fixture_path = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures'))
RSpec.configure do |c|
c.module_path = File.join(File.dirname(__FILE__), '../../')
c.module_path = File.join(fixture_path, 'modules')
c.manifest_dir = File.join(fixture_path, 'manifests')
end