Skip to content

Commit

Permalink
Fixup 220a7a3 Add PE facts to stdlib
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff McCune committed Oct 25, 2012
1 parent c87ccad commit b56230d
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions spec/unit/facter/pe_version_spec.rb
Expand Up @@ -3,18 +3,18 @@
require 'spec_helper'

describe "PE Version specs" do
before :each do
Facter.collection.loader.load(:pe_version)
end

context "If PE is installed" do
%w{ 2.6.1 2.10.300 }.each do |version|
puppetversion = "2.7.19 (Puppet Enterprise #{version})"
context "puppetversion => #{puppetversion}" do
before :all do
before :each do
Facter.fact(:puppetversion).stubs(:value).returns(puppetversion)
end

after :all do
Facter.clear
end

(major,minor,patch) = version.split(".")

it "Should return true" do
Expand All @@ -40,15 +40,11 @@
end
end

context "If PE is not installed" do
before :all do
context "When PE is not installed" do
before :each do
Facter.fact(:puppetversion).stubs(:value).returns("2.7.19")
end

after :all do
Facter.clear
end

it "is_pe is false" do
Facter.fact(:is_pe).value.should == false
end
Expand Down

0 comments on commit b56230d

Please sign in to comment.