spec/unit/plugins/hostname_spec.rb in ohai-6.20.0 vs spec/unit/plugins/hostname_spec.rb in ohai-6.22.0.rc.0

- old
+ new

@@ -33,7 +33,17 @@ it "should not set a domain if fqdn is not set" do @ohai._require_plugin("hostname") @ohai.domain.should == nil end - + + it "should require the os plugin" do + @ohai.should_receive(:require_plugin).with("os").and_return(true) + @ohai._require_plugin("hostname") + end + + it "should load a platform specific hostname plugin" do + @ohai[:os] = "linux" + @ohai.should_receive(:require_plugin).with("linux::hostname").and_return(true) + @ohai._require_plugin("hostname") + end end