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