From 1125e1e050a3807df2ada4d8cf2d36c22a75ed2b Mon Sep 17 00:00:00 2001 From: Hans de Graaff Date: Sat, 18 Sep 2010 17:31:11 +0200 Subject: Make sure FreeBSD spec also works on systems that have /proc/cpuinfo. --- spec/unit/util/virtual.rb | 1 + 1 file changed, 1 insertion(+) 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 -- cgit