Module: ChefSpec::API::MsuPackageMatchers
- Defined in:
- lib/chefspec/api/msu_package.rb
Overview
Instance Method Summary collapse
-
#install_msu_package(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a
msu_packageresource exists in the Chef run with the action:install. -
#remove_msu_package(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a
msu_packageresource exists in the Chef run with the action:remove.
Instance Method Details
#install_msu_package(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a msu_package resource exists in the Chef run with the action :install. Given a Chef Recipe that installs “KB2959977” as a msu_package:
msu_package 'KB2959977' do
source 'C:\Windows8.1-KB2959977-x64.msu'
action :install
end
The Examples section demonstrates the different ways to test a msu_package resource with ChefSpec.
40 41 42 |
# File 'lib/chefspec/api/msu_package.rb', line 40 def install_msu_package(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:msu_package, :install, resource_name) end |
#remove_msu_package(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a msu_package resource exists in the Chef run with the action :remove. Given a Chef Recipe that removes “KB2959977” as a msu_package:
msu_package 'KB2959977' do
action :remove
end
The Examples section demonstrates the different ways to test a msu_package resource with ChefSpec.
77 78 79 |
# File 'lib/chefspec/api/msu_package.rb', line 77 def remove_msu_package(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:msu_package, :remove, resource_name) end |