summaryrefslogtreecommitdiff
path: root/spec/unit/data_bag_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/data_bag_spec.rb')
-rw-r--r--spec/unit/data_bag_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/unit/data_bag_spec.rb b/spec/unit/data_bag_spec.rb
index c2bcff4378..92da4cade1 100644
--- a/spec/unit/data_bag_spec.rb
+++ b/spec/unit/data_bag_spec.rb
@@ -127,9 +127,9 @@ describe Chef::DataBag do
it "should return the data bag" do
allow(Chef::ServerAPI).to receive(:new).and_return(@http_client)
- expect(@http_client).to receive(:get).with("data/foo").and_return({"bar" => "https://myserver.example.com/data/foo/bar"})
+ expect(@http_client).to receive(:get).with("data/foo").and_return({ "bar" => "https://myserver.example.com/data/foo/bar" })
data_bag = Chef::DataBag.load("foo")
- expect(data_bag).to eq({"bar" => "https://myserver.example.com/data/foo/bar"})
+ expect(data_bag).to eq({ "bar" => "https://myserver.example.com/data/foo/bar" })
end
end
@@ -180,7 +180,7 @@ describe Chef::DataBag do
expect(IO).to receive(:read).with(File.join(@paths.first, "foo/bar.json")).and_return('{"id": "bar", "name": "Bob Bar" }')
expect(IO).to receive(:read).with(File.join(@paths.first, "foo/baz.json")).and_return('{"id": "baz", "name": "John Baz" }')
data_bag = Chef::DataBag.load("foo")
- expect(data_bag).to eq({ "bar" => { "id" => "bar", "name" => "Bob Bar" }, "baz" => { "id" => "baz", "name" => "John Baz" }})
+ expect(data_bag).to eq({ "bar" => { "id" => "bar", "name" => "Bob Bar" }, "baz" => { "id" => "baz", "name" => "John Baz" } })
end
it "should raise if data bag has items with similar names but different content" do
@@ -208,7 +208,7 @@ describe Chef::DataBag do
expect(IO).to receive(:read).with(File.join(path, "foo/baz.json")).and_return(item_with_same_content)
end
data_bag = Chef::DataBag.load("foo")
- test_data_bag = { "bar" => { "id" => "bar", "name" => "Bob Bar"} }
+ test_data_bag = { "bar" => { "id" => "bar", "name" => "Bob Bar" } }
expect(data_bag).to eq(test_data_bag)
end
@@ -222,7 +222,7 @@ describe Chef::DataBag do
expect(IO).to receive(:read).with(File.join(path, "foo/baz.json")).and_return(test_uniq_item)
end
data_bag = Chef::DataBag.load("foo")
- test_data_bag = { "bar" => { "id" => "bar", "name" => "Bob Bar"} }
+ test_data_bag = { "bar" => { "id" => "bar", "name" => "Bob Bar" } }
@paths.each_with_index do |path, index|
test_data_bag["baz_#{index}"] = { "id" => "baz_#{index}", "name" => "John Baz", "path" => path }
end