global
def data_bag_item(bag, id, secret = nil)
- See: Chef::DSL::DataQuery#data_bag_item -
def data_bag_item(bag, id, secret = nil) return super unless Chef::Config[:solo] && $CHEFSPEC_MODE stub = ChefSpec::Stubs::DataBagItemRegistry.stub_for(bag, id) if stub.nil? raise ChefSpec::Error::DataBagItemNotStubbed.new(args: [bag, id]) end stub.result end