commit 1125e1e050a3807df2ada4d8cf2d36c22a75ed2b Author: Hans de Graaff Date: Sat Sep 18 17:31:11 2010 +0200 Make sure FreeBSD spec also works on systems that have /proc/cpuinfo. diff --git a/spec/unit/util/virtual.rb b/spec/unit/util/virtual.rb index 1e31a2f..cc528d1 100644 --- a/spec/unit/util/virtual.rb +++ b/spec/unit/util/virtual.rb @@ -101,6 +101,7 @@ describe Facter::Util::Virtual do end it "should detect kvm on FreeBSD" do + FileTest.stubs(:exists?).with("/proc/cpuinfo").returns(false) Facter.fact(:kernel).stubs(:value).returns("FreeBSD") Facter::Util::Resolution.stubs(:exec).with("/sbin/sysctl -n hw.model").returns("QEMU Virtual CPU version 0.12.4") Facter::Util::Virtual.should be_kvm