Module: ChefSpec::API::BatchMatchers
- Defined in:
- lib/chefspec/api/batch.rb
Overview
Instance Method Summary collapse
-
#run_batch(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a
batch
resource exists in the Chef run with the action:run
.
Instance Method Details
#run_batch(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a batch
resource exists in the Chef run with the action :run
. Given a Chef Recipe that runs “unzip” using batch
:
batch 'unzip' do
action :run
end
The Examples section demonstrates the different ways to test a batch
resource with ChefSpec.
39 40 41 |
# File 'lib/chefspec/api/batch.rb', line 39 def run_batch(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:batch, :run, resource_name) end |