diff options
author | Jeff McCune <jeff@puppetlabs.com> | 2012-10-25 11:59:02 -0700 |
---|---|---|
committer | Jeff McCune <jeff@puppetlabs.com> | 2012-10-25 11:59:02 -0700 |
commit | c8c7afc7a00aaeeddea6514d9fe9508513e53a73 (patch) | |
tree | 6cfe459dced10ecd8f88bcf079e5ffee717083e6 /spec/spec_helper.rb | |
parent | 03ec16e291a70ac5ac412be36ae3b86a771b98af (diff) | |
parent | 88af331b0e9b0e8c8a3c1e74e4c5598dc7b8e1c8 (diff) | |
download | puppet-stdlib-c8c7afc7a00aaeeddea6514d9fe9508513e53a73.tar.gz puppet-stdlib-c8c7afc7a00aaeeddea6514d9fe9508513e53a73.tar.bz2 |
Merge branch '2.5.x' into 3.0.x
* 2.5.x:
Update Modulefile, CHANGELOG for 2.5.0
Explicitly load functions used by ensure_resource
re-formatting
Add better docs about duplicate resource failures
Handle undef for parameter argument
Add function ensure_resource and defined_with_params
Revert "Revert "Merge branch 'haus-add_pe_facts_to_stdlib' into 2.4.x""
Revert "Merge branch 'haus-add_pe_facts_to_stdlib' into 2.4.x"
Prevent undefined method `split' for nil:NilClass with pe_foo_version facts
(maint) Clear all facts before each example
Add spec tests for pe_version facts
Add PE facts to stdlib
Conflicts:
CHANGELOG
Modulefile
spec/spec_helper.rb
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index e269b90..931d35c 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -11,3 +11,18 @@ gem 'rspec', '>=2.0.0' require 'rspec/expectations' require 'puppetlabs_spec_helper/module_spec_helper' + +RSpec.configure do |config| + # FIXME REVISIT - We may want to delegate to Facter like we do in + # Puppet::PuppetSpecInitializer.initialize_via_testhelper(config) because + # this behavior is a duplication of the spec_helper in Facter. + config.before :each do + # Ensure that we don't accidentally cache facts and environment between + # test cases. This requires each example group to explicitly load the + # facts being exercised with something like + # Facter.collection.loader.load(:ipaddress) + Facter::Util::Loader.any_instance.stubs(:load_all) + Facter.clear + Facter.clear_messages + end +end |