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