summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-01-27 17:51:39 -0600
committerLuke Kanies <luke@madstop.com>2009-01-27 18:06:00 -0600
commita82f476382e0a4bad90044883922a069a87f6beb (patch)
treec5c6e62e08a9d83767b219046ca0a93d4766cd3c
parent1f1fa9bcecfb6d137219819c9aeefdc41f3f9dce (diff)
downloadfacter-a82f476382e0a4bad90044883922a069a87f6beb.tar.gz
facter-a82f476382e0a4bad90044883922a069a87f6beb.tar.xz
facter-a82f476382e0a4bad90044883922a069a87f6beb.zip
Renaming Facter::Macosx to Facter::Util::Macosx
This name change just reflects the file location. Signed-off-by: Luke Kanies <luke@madstop.com>
-rw-r--r--lib/facter/util/macosx.rb2
-rwxr-xr-xspec/unit/util/macosx.rb26
2 files changed, 14 insertions, 14 deletions
diff --git a/lib/facter/util/macosx.rb b/lib/facter/util/macosx.rb
index d32d257..6e7986e 100644
--- a/lib/facter/util/macosx.rb
+++ b/lib/facter/util/macosx.rb
@@ -16,7 +16,7 @@
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston MA 02110-1301 USA
##
-module Facter::Macosx
+module Facter::Util::Macosx
require 'thread'
require 'facter/util/plist'
require 'facter/util/resolution'
diff --git a/spec/unit/util/macosx.rb b/spec/unit/util/macosx.rb
index 01e862d..a543013 100755
--- a/spec/unit/util/macosx.rb
+++ b/spec/unit/util/macosx.rb
@@ -4,16 +4,16 @@ require File.dirname(__FILE__) + '/../../spec_helper'
require 'facter/util/macosx'
-describe Facter::Macosx do
+describe Facter::Util::Macosx do
it "should be able to retrieve profiler data as xml for a given data field" do
Facter::Util::Resolution.expects(:exec).with("/usr/sbin/system_profiler -xml foo").returns "yay"
- Facter::Macosx.profiler_xml("foo").should == "yay"
+ Facter::Util::Macosx.profiler_xml("foo").should == "yay"
end
it "should use PList to convert xml to data structures" do
Plist.expects(:parse_xml).with("foo").returns "bar"
- Facter::Macosx.intern_xml("foo").should == "bar"
+ Facter::Util::Macosx.intern_xml("foo").should == "bar"
end
describe "when collecting profiler data" do
@@ -23,25 +23,25 @@ describe Facter::Macosx do
{'_name' => "foo", "yay" => "bar"}
]
]
- Facter::Macosx.expects(:profiler_xml).with("foo").returns "eh"
- Facter::Macosx.expects(:intern_xml).with("eh").returns @result
- Facter::Macosx.profiler_data("foo").should == {"yay" => "bar"}
+ Facter::Util::Macosx.expects(:profiler_xml).with("foo").returns "eh"
+ Facter::Util::Macosx.expects(:intern_xml).with("eh").returns @result
+ Facter::Util::Macosx.profiler_data("foo").should == {"yay" => "bar"}
end
it "should return nil if an exception is thrown during parsing of xml" do
- Facter::Macosx.expects(:profiler_xml).with("foo").returns "eh"
- Facter::Macosx.expects(:intern_xml).with("eh").raises "boo!"
- Facter::Macosx.profiler_data("foo").should be_nil
+ Facter::Util::Macosx.expects(:profiler_xml).with("foo").returns "eh"
+ Facter::Util::Macosx.expects(:intern_xml).with("eh").raises "boo!"
+ Facter::Util::Macosx.profiler_data("foo").should be_nil
end
end
it "should return the profiler data for 'SPHardwareDataType' as the hardware information" do
- Facter::Macosx.expects(:profiler_data).with("SPHardwareDataType").returns "eh"
- Facter::Macosx.hardware_overview.should == "eh"
+ Facter::Util::Macosx.expects(:profiler_data).with("SPHardwareDataType").returns "eh"
+ Facter::Util::Macosx.hardware_overview.should == "eh"
end
it "should return the profiler data for 'SPSoftwareDataType' as the os information" do
- Facter::Macosx.expects(:profiler_data).with("SPSoftwareDataType").returns "eh"
- Facter::Macosx.os_overview.should == "eh"
+ Facter::Util::Macosx.expects(:profiler_data).with("SPSoftwareDataType").returns "eh"
+ Facter::Util::Macosx.os_overview.should == "eh"
end
end