diff options
author | Tim Smith <tsmith@chef.io> | 2017-09-07 17:27:04 -0700 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2017-09-07 17:27:04 -0700 |
commit | 00bfd9fd3a2623464cfc899eb57cb618c087cb8e (patch) | |
tree | 462c4b8724ecd3171136ed46b9aab0d7a15b22ec | |
parent | ca52d67a4e033d83225e63e6a853c42b0a36329d (diff) | |
download | ohai-00bfd9fd3a2623464cfc899eb57cb618c087cb8e.tar.gz |
Chefstyle fixes
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | spec/unit/mixin/azure_metadata_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/unit/mixin/azure_metadata_spec.rb b/spec/unit/mixin/azure_metadata_spec.rb index bdbb9f3e..96c7ecfb 100644 --- a/spec/unit/mixin/azure_metadata_spec.rb +++ b/spec/unit/mixin/azure_metadata_spec.rb @@ -31,14 +31,14 @@ describe Ohai::Mixin::AzureMetadata do allow(http_mock).to receive(:read_timeout=) allow(Net::HTTP).to receive(:start).with("169.254.169.254").and_return(http_mock) - expect(http_mock).to receive(:get).with('http://www.chef.io', initheader = { "Metadata" => "true" }) - mixin.http_get('http://www.chef.io') + expect(http_mock).to receive(:get).with("http://www.chef.io", initheader = { "Metadata" => "true" }) + mixin.http_get("http://www.chef.io") end end describe "#fetch_metadata" do it "returns an empty hash given a non-200 response" do - http_mock = double("http", {:code => "500" }) + http_mock = double("http", { :code => "500" }) allow(mixin).to receive(:http_get).and_return(http_mock) expect(Ohai::Log).to receive(:warn) @@ -47,7 +47,7 @@ describe Ohai::Mixin::AzureMetadata do end it "returns an empty hash given invalid JSON response" do - http_mock = double("http", {:code => "200", :body => '{ "foo" "bar"}' }) + http_mock = double("http", { :code => "200", :body => '{ "foo" "bar"}' }) allow(mixin).to receive(:http_get).and_return(http_mock) expect(Ohai::Log).to receive(:warn) @@ -56,12 +56,12 @@ describe Ohai::Mixin::AzureMetadata do end it "returns a populated hash given valid JSON response" do - http_mock = double("http", {:code => "200", :body => '{ "foo": "bar"}' }) + http_mock = double("http", { :code => "200", :body => '{ "foo": "bar"}' }) allow(mixin).to receive(:http_get).and_return(http_mock) expect(Ohai::Log).not_to receive(:warn) vals = mixin.fetch_metadata - expect(vals).to eq({"foo" => "bar"}) + expect(vals).to eq({ "foo" => "bar" }) end end end |