spec_helper.rb 624 B

123456789101112131415161718192021
  1. dir = File.expand_path(File.dirname(__FILE__))
  2. $LOAD_PATH.unshift File.join(dir, 'lib')
  3. require 'puppet'
  4. require 'rspec'
  5. require 'puppetlabs_spec_helper/module_spec_helper'
  6. #require 'rspec-hiera-puppet'
  7. require 'rspec-puppet/coverage'
  8. require 'rspec/autorun'
  9. fixture_path = File.expand_path(File.join(__FILE__, '..', 'fixtures'))
  10. RSpec.configure do |c|
  11. c.module_path = File.join(fixture_path, 'modules')
  12. c.manifest_dir = File.join(fixture_path, 'manifests')
  13. c.pattern = "spec/*/*_spec.rb"
  14. end
  15. Puppet::Util::Log.level = :warning
  16. Puppet::Util::Log.newdestination(:console)
  17. at_exit { RSpec::Puppet::Coverage.report! }