spec/unit/virtual_spec.rb in facter-1.7.1 vs spec/unit/virtual_spec.rb in facter-1.7.2.rc1

- old
+ new

@@ -203,10 +203,16 @@ it "(#17612) is 'gce'" do Facter.fact(:virtual).value.should == "gce" end end end + + it "(#20236) is vmware when dmidecode contains vmware and lspci returns insufficient information" do + Facter::Util::Resolution.stubs(:exec).with('lspci 2>/dev/null').returns("garbage\ninformation\n") + Facter::Util::Resolution.stubs(:exec).with('dmidecode').returns("On Board Device 1 Information\nType: Video\nStatus: Disabled\nDescription: VMware SVGA II") + Facter.fact(:virtual).value.should eq("vmware") + end end describe "on Solaris" do before(:each) do Facter::Util::Resolution.stubs(:exec).with("vmware -v").returns false @@ -270,9 +276,10 @@ describe "on Windows" do require 'facter/util/wmi' before do Facter.fact(:kernel).stubs(:value).returns("windows") + Facter.fact(:architecture).stubs(:value).returns("x64") end it "should be kvm with KVM model name from Win32_ComputerSystem" do computersystem = mock('computersystem', :model => 'KVM') Facter::Util::WMI.expects(:execquery).returns([computersystem])