module ChefSpec::API::Stubs
def stub_data_bag_item(bag, id, &block)
-
(ChefSpec::DataBagItemStub)
-
Parameters:
-
id
(String
) -- -
bag
(String, Symbol
) --
Other tags:
- Example: stubbing a data_bag_item to raise an exception -
Example: stubbing a data_bag_item with a block that is evaluated at runtime -
Example: stubbing a data_bag_item to return a Hash of data -
def stub_data_bag_item(bag, id, &block) ChefSpec::Stubs::DataBagItemRegistry.register(ChefSpec::Stubs::DataBagItemStub.new(bag, id, &block)) end