summaryrefslogtreecommitdiff
path: root/spec/unit/facter/pe_version_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/facter/pe_version_spec.rb')
-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