spec_helper.rb 796 B

1234567891011121314151617
  1. require 'puppet'
  2. require 'rspec'
  3. require 'rspec-puppet'
  4. def param_value(subject, type, title, param)
  5. subject.resource(type, title).send(:parameters)[param.to_sym]
  6. end
  7. $operatingsystems = ['fedora','rhel','centos','suse','opensuse', 'debian','ubuntu']
  8. RSpec.configure do |c|
  9. c.module_path = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures/modules'))
  10. # Using an empty site.pp file to avoid: https://github.com/rodjek/rspec-puppet/issues/15
  11. c.manifest_dir = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures/manifests'))
  12. # Use fixtures for config file mainly to support using our own hiera.yaml settings.
  13. # Pending: https://github.com/rodjek/rspec-puppet/pull/21
  14. # c.config = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures/puppet.conf'))
  15. end