diff options
author | Paul Berry <paul@puppetlabs.com> | 2010-11-09 16:04:15 -0800 |
---|---|---|
committer | Paul Berry <paul@puppetlabs.com> | 2010-11-09 16:04:15 -0800 |
commit | ee5f78a94e0aa1e12945e90f8c47d8be78ed00f8 (patch) | |
tree | 6d430e20f3acc22dd855bc20eda5753b206a838d /spec/unit/virtual.rb | |
parent | 54d742235279863ba455900e053ecdc2b764e564 (diff) | |
parent | 43e203c688399ac86d337514aecb6fa0c9def683 (diff) | |
download | facter-ee5f78a94e0aa1e12945e90f8c47d8be78ed00f8.tar.gz facter-ee5f78a94e0aa1e12945e90f8c47d8be78ed00f8.tar.xz facter-ee5f78a94e0aa1e12945e90f8c47d8be78ed00f8.zip |
Merge remote branch 'stschulte/feature/master/5040' into next
Manually resolved conflicts:
lib/facter/virtual.rb
spec/unit/virtual.rb
Diffstat (limited to 'spec/unit/virtual.rb')
-rw-r--r-- | spec/unit/virtual.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/unit/virtual.rb b/spec/unit/virtual.rb index b79ced7..a7767c9 100644 --- a/spec/unit/virtual.rb +++ b/spec/unit/virtual.rb @@ -24,6 +24,11 @@ describe "Virtual fact" do Facter.fact(:virtual).value.should == "jail" end + it "should be hpvm on HP-UX when in HP-VM" do + Facter.fact(:kernel).stubs(:value).returns("HP-UX") + Facter::Util::Virtual.stubs(:hpvm?).returns(true) + Facter.fact(:virtual).value.should == "hpvm" + end end describe "is_virtual fact" do @@ -74,4 +79,10 @@ describe "is_virtual fact" do Facter.fact(:is_virtual).value.should == "true" end + it "should be true when running on hp-vm" do + Facter.fact(:kernel).stubs(:value).returns("HP-UX") + Facter.fact(:virtual).stubs(:value).returns("hpvm") + Facter.fact(:is_virtual).value.should == "true" + end + end |