summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff McCune <jeff@puppetlabs.com>2012-10-25 15:38:50 -0700
committerJeff McCune <jeff@puppetlabs.com>2012-10-25 15:38:50 -0700
commit3f310ec87412b0632046a9a5f4c6f1fc37a6df7d (patch)
tree7e53b3864b4941d1791270c9d2d87abdc0f4ea7b
parent88af331b0e9b0e8c8a3c1e74e4c5598dc7b8e1c8 (diff)
parent97f836f41b7f8b0aec6733c82873d32140c07304 (diff)
downloadpuppet-stdlib-3f310ec87412b0632046a9a5f4c6f1fc37a6df7d.tar.gz
puppet-stdlib-3f310ec87412b0632046a9a5f4c6f1fc37a6df7d.tar.bz2
Merge branch 'fix/2.5.x/facter_loader' into 2.5.x
* fix/2.5.x/facter_loader: (maint) Fix spec failures resulting from Facter API changes
-rw-r--r--spec/unit/facter/pe_version_spec.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/unit/facter/pe_version_spec.rb b/spec/unit/facter/pe_version_spec.rb
index 202a0e5..931c6d4 100644
--- a/spec/unit/facter/pe_version_spec.rb
+++ b/spec/unit/facter/pe_version_spec.rb
@@ -4,7 +4,15 @@ require 'spec_helper'
describe "PE Version specs" do
before :each do
- Facter.collection.loader.load(:pe_version)
+ # Explicitly load the pe_version.rb file which contains generated facts
+ # that cannot be automatically loaded. Puppet 2.x implements
+ # Facter.collection.load while Facter 1.x markes Facter.collection.load as
+ # a private method.
+ if Facter.collection.respond_to? :load
+ Facter.collection.load(:pe_version)
+ else
+ Facter.collection.loader.load(:pe_version)
+ end
end
context "If PE is installed" do