$OpenBSD: patch-spec_unit_physicalprocessorcount_spec_rb,v 1.1 2013/06/28 08:36:12 jasper Exp $

OpenBSD: add physicalprocessorcount fact
http://projects.puppetlabs.com/issues/21499

--- spec/unit/physicalprocessorcount_spec.rb.orig	Mon May 13 21:30:15 2013
+++ spec/unit/physicalprocessorcount_spec.rb	Thu Jun 27 23:03:45 2013
@@ -73,4 +73,12 @@ describe "Physical processor count facts" do
       end
     end
   end
+  
+  describe "on openbsd" do
+    it "should return 4 physical CPUs" do
+      Facter.fact(:kernel).stubs(:value).returns("OpenBSD")
+      Facter::Util::Resolution.expects(:exec).with("sysctl -n hw.ncpufound").returns("4")
+      Facter.fact(:physicalprocessorcount).value.should == "4"
+    end
+  end
 end
