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