fuel-library/deployment/puppet/ntp/spec/spec_helper.rb
Stanislaw Bogatkin 057ef69824 Sync puppet ntp module from upstream
Upstream link to module: https://github.com/puppetlabs/puppetlabs-ntp
Upstream SHA commit: 1f519f719552aedc98b6995e42d23201a0286a58
Change-Id: Ib481907044ebd7f4f147ce1a26de5489620904ff
Related-Bug: 1298360
2015-01-16 18:22:29 +03:00

29 lines
720 B
Ruby

require 'puppetlabs_spec_helper/module_spec_helper'
RSpec.configure do |c|
c.include PuppetlabsSpec::Files
c.before :each do
# Ensure that we don't accidentally cache facts and environment
# between test cases.
Facter::Util::Loader.any_instance.stubs(:load_all)
Facter.clear
Facter.clear_messages
# Store any environment variables away to be restored later
@old_env = {}
ENV.each_key {|k| @old_env[k] = ENV[k]}
if Gem::Version.new(`puppet --version`) >= Gem::Version.new('3.5')
Puppet.settings[:strict_variables]=true
end
if ENV['PARSER']
Puppet.settings[:parser]=ENV['PARSER']
end
end
c.after :each do
PuppetlabsSpec::Files.cleanup
end
end