Module: ChefSpec::API::IpsPackageMatchers
- Defined in:
- lib/chefspec/api/ips_package.rb
Overview
Instance Method Summary collapse
-
#install_ips_package(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that an
ips_package
resource exists in the Chef run with the action:install
. -
#remove_ips_package(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that an
ips_package
resource exists in the Chef run with the action:remove
. -
#upgrade_ips_package(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that an
ips_package
resource exists in the Chef run with the action:upgrade
.
Instance Method Details
#install_ips_package(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that an ips_package
resource exists in the Chef run with the action :install
. Given a Chef Recipe that installs “apache2” as an ips_package
:
ips_package 'apache2' do
action :install
end
The Examples section demonstrates the different ways to test an ips_package
resource with ChefSpec.
39 40 41 |
# File 'lib/chefspec/api/ips_package.rb', line 39 def install_ips_package(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:ips_package, :install, resource_name) end |
#remove_ips_package(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that an ips_package
resource exists in the Chef run with the action :remove
. Given a Chef Recipe that removes “apache2” as an ips_package
:
ips_package 'apache2' do
action :remove
end
The Examples section demonstrates the different ways to test an ips_package
resource with ChefSpec.
76 77 78 |
# File 'lib/chefspec/api/ips_package.rb', line 76 def remove_ips_package(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:ips_package, :remove, resource_name) end |
#upgrade_ips_package(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that an ips_package
resource exists in the Chef run with the action :upgrade
. Given a Chef Recipe that upgrades “apache2” as an ips_package
:
ips_package 'apache2' do
action :upgrade
end
The Examples section demonstrates the different ways to test an ips_package
resource with ChefSpec.
113 114 115 |
# File 'lib/chefspec/api/ips_package.rb', line 113 def upgrade_ips_package(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:ips_package, :upgrade, resource_name) end |