summaryrefslogtreecommitdiff
path: root/spec/unit/plugins/hostname_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/plugins/hostname_spec.rb')
-rw-r--r--spec/unit/plugins/hostname_spec.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/spec/unit/plugins/hostname_spec.rb b/spec/unit/plugins/hostname_spec.rb
index 0390ddac..bf37ef1a 100644
--- a/spec/unit/plugins/hostname_spec.rb
+++ b/spec/unit/plugins/hostname_spec.rb
@@ -72,7 +72,7 @@ describe Ohai::System, "hostname plugin" do
it "is called twice" do
@plugin.run
- expect(@plugin[:fqdn]).to eq("katie.local")
+ expect(@plugin[:fqdn]).to eq(nil)
end
end
@@ -82,9 +82,7 @@ describe Ohai::System, "hostname plugin" do
allow(@plugin).to receive(:shell_out).with("hostname -s").and_return(
mock_shell_out(0, "katie", "")
)
- allow(@plugin).to receive(:shell_out).with("hostname --fqdn").and_return(
- mock_shell_out(0, "katie.local", "")
- )
+ expect(@plugin).to receive(:canonicalize_hostname).with("katie.local").and_return("katie.local")
end
it "is not be called twice" do