summaryrefslogtreecommitdiff
path: root/spec/unit/plugins/azure_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/plugins/azure_spec.rb')
-rw-r--r--spec/unit/plugins/azure_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/unit/plugins/azure_spec.rb b/spec/unit/plugins/azure_spec.rb
index 63238114..257032f6 100644
--- a/spec/unit/plugins/azure_spec.rb
+++ b/spec/unit/plugins/azure_spec.rb
@@ -46,7 +46,7 @@ describe Ohai::System, "plugin azure" do
end
describe "with azure hint file" do
- before(:each) do
+ before do
allow(plugin).to receive(:hint?).with("azure").and_return(hint)
end
@@ -62,7 +62,7 @@ describe Ohai::System, "plugin azure" do
end
describe "without azure hint file or agent or dhcp options" do
- before(:each) do
+ before do
allow(plugin).to receive(:hint?).with("azure").and_return(false)
allow(File).to receive(:exist?).with("/usr/sbin/waagent").and_return(false)
allow(Dir).to receive(:exist?).with('C:\WindowsAzure').and_return(false)
@@ -95,7 +95,7 @@ describe Ohai::System, "plugin azure" do
end
describe "with rackspace hint file, no agent, and no dhcp lease" do
- before(:each) do
+ before do
allow(plugin).to receive(:hint?).with("rackspace").and_return(true)
allow(plugin).to receive(:hint?).with("azure").and_return(false)
allow(File).to receive(:exist?).with("/usr/sbin/waagent").and_return(false)
@@ -107,7 +107,7 @@ describe Ohai::System, "plugin azure" do
end
describe "without azure hint file but with agent on linux" do
- before(:each) do
+ before do
allow(plugin).to receive(:hint?).with("azure").and_return(false)
allow(File).to receive(:exist?).with("/usr/sbin/waagent").and_return(true)
allow(Dir).to receive(:exist?).with('C:\WindowsAzure').and_return(false)
@@ -117,7 +117,7 @@ describe Ohai::System, "plugin azure" do
end
describe "without azure hint file but with agent on windows" do
- before(:each) do
+ before do
allow(plugin).to receive(:hint?).with("azure").and_return(false)
allow(File).to receive(:exist?).with("/usr/sbin/waagent").and_return(false)
allow(Dir).to receive(:exist?).with('C:\WindowsAzure').and_return(true)
@@ -127,7 +127,7 @@ describe Ohai::System, "plugin azure" do
end
describe "without azure hint or agent but with dhcp option" do
- before(:each) do
+ before do
allow(plugin).to receive(:hint?).with("azure").and_return(false)
allow(File).to receive(:exist?).with("/usr/sbin/waagent").and_return(false)
allow(Dir).to receive(:exist?).with('C:\WindowsAzure').and_return(false)