2013-04-08 23:49:18 +02:00
|
|
|
require 'puppetlabs_spec_helper/module_spec_helper'
|
2013-04-09 14:26:02 +02:00
|
|
|
|
|
|
|
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]}
|
|
|
|
end
|
|
|
|
|
|
|
|
c.after :each do
|
|
|
|
PuppetlabsSpec::Files.cleanup
|
|
|
|
end
|
|
|
|
end
|