spec_helper.rb 641 B

1234567891011121314151617181920212223242526272829
  1. require 'rubygems'
  2. require 'rspec-puppet'
  3. require 'mocha/api'
  4. require 'puppetlabs_spec_helper/module_spec_helper'
  5. fixture_path = File.expand_path(File.join(__FILE__, '..', 'fixtures'))
  6. RSpec.configure do |c|
  7. c.module_path = File.join(fixture_path, 'modules')
  8. c.manifest_dir = File.join(fixture_path, 'manifests')
  9. c.mock_with :mocha
  10. end
  11. def centos_facts
  12. {
  13. :operatingsystem => 'CentOS',
  14. :osfamily => 'RedHat',
  15. :operatingsystemrelease => '6',
  16. }
  17. end
  18. def debian_facts
  19. {
  20. :operatingsystem => 'Debian',
  21. :osfamily => 'Debian',
  22. :operatingsystemrelease => '7',
  23. }
  24. end