summaryrefslogtreecommitdiff
path: root/spec/unit/dsl/data_query_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/dsl/data_query_spec.rb')
-rw-r--r--spec/unit/dsl/data_query_spec.rb11
1 files changed, 5 insertions, 6 deletions
diff --git a/spec/unit/dsl/data_query_spec.rb b/spec/unit/dsl/data_query_spec.rb
index 36f9aa13b1..22b4c07b80 100644
--- a/spec/unit/dsl/data_query_spec.rb
+++ b/spec/unit/dsl/data_query_spec.rb
@@ -35,23 +35,23 @@ describe Chef::DSL::DataQuery do
describe "::data_bag" do
it "lists the items in a data bag" do
allow(Chef::DataBag).to receive(:load)
- .with("bag_name")
- .and_return("item_1" => "http://url_for/item_1", "item_2" => "http://url_for/item_2")
+ .with("bag_name")
+ .and_return("item_1" => "http://url_for/item_1", "item_2" => "http://url_for/item_2")
expect( language.data_bag("bag_name").sort ).to eql %w{item_1 item_2}
end
end
shared_examples_for "a data bag item" do
it "validates the name of the data bag you're trying to load an item from" do
- expect{ language.send(method_name, " %%^& ", "item_name") }.to raise_error(Chef::Exceptions::InvalidDataBagName)
+ expect { language.send(method_name, " %%^& ", "item_name") }.to raise_error(Chef::Exceptions::InvalidDataBagName)
end
it "validates the id of the data bag item you're trying to load" do
- expect{ language.send(method_name, "bag_name", " 987 (*&()") }.to raise_error(Chef::Exceptions::InvalidDataBagItemID)
+ expect { language.send(method_name, "bag_name", " 987 (*&()") }.to raise_error(Chef::Exceptions::InvalidDataBagItemID)
end
it "validates that the id of the data bag item is not nil" do
- expect{ language.send(method_name, "bag_name", nil) }.to raise_error(Chef::Exceptions::InvalidDataBagItemID)
+ expect { language.send(method_name, "bag_name", nil) }.to raise_error(Chef::Exceptions::InvalidDataBagItemID)
end
end
@@ -100,7 +100,6 @@ describe Chef::DSL::DataQuery do
expect( Chef::Log ).to receive(:debug).with(/Data bag item looks encrypted/)
expect(language.data_bag_item(bag_name, item_name)).to eq(enc_data_bag)
end
-
end
end
end