2012-01-04 02:03:24 +01:00
|
|
|
require 'rubygems'
|
2012-03-21 14:21:50 +01:00
|
|
|
require 'puppet'
|
2012-01-04 02:03:24 +01:00
|
|
|
require 'rspec-puppet'
|
|
|
|
|
|
|
|
def param_value(subject, type, title, param)
|
|
|
|
subject.resource(type, title).send(:parameters)[param.to_sym]
|
|
|
|
end
|
|
|
|
|
2012-05-22 22:10:05 +02:00
|
|
|
Puppet.parse_config
|
|
|
|
puppet_module_path = Puppet[:modulepath]
|
|
|
|
|
2012-03-21 14:21:50 +01:00
|
|
|
fixture_path = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures'))
|
|
|
|
|
2012-01-04 02:03:24 +01:00
|
|
|
RSpec.configure do |c|
|
2012-05-22 22:10:05 +02:00
|
|
|
fixture_module_path = File.join(fixture_path, 'modules')
|
|
|
|
c.module_path = [fixture_module_path, puppet_module_path].join(":")
|
2012-03-21 14:21:50 +01:00
|
|
|
c.manifest_dir = File.join(fixture_path, 'manifests')
|
2012-01-04 02:03:24 +01:00
|
|
|
end
|