diff options
Diffstat (limited to 'spec/unit/dsl/data_query_spec.rb')
-rw-r--r-- | spec/unit/dsl/data_query_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/unit/dsl/data_query_spec.rb b/spec/unit/dsl/data_query_spec.rb index 36f9aa13b1..55c6e5f578 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 |