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