Module: ChefSpec::API::OsxProfileMatchers
- Defined in:
- lib/chefspec/api/osx_profile.rb
Overview
Instance Method Summary collapse
-
#install_osx_profile(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that an
osx_profileresource exists in the Chef run with the action:install. -
#remove_osx_profile(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that an
osx_profileresource exists in the Chef run with the action:remove.
Instance Method Details
#install_osx_profile(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that an osx_profile resource exists in the Chef run with the action :install. Given a Chef Recipe that installs “bsmith” as an profile:
osx_profile 'bsmith' do
action :install
end
The Examples section demonstrates the different ways to test an osx_profile resource with ChefSpec.
30 31 32 |
# File 'lib/chefspec/api/osx_profile.rb', line 30 def install_osx_profile(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:osx_profile, :install, resource_name) end |
#remove_osx_profile(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that an osx_profile resource exists in the Chef run with the action :remove. Given a Chef Recipe that removes “bsmith” as an profile:
osx_profile 'bsmith' do
action :remove
end
The Examples section demonstrates the different ways to test an osx_profile resource with ChefSpec.
58 59 60 |
# File 'lib/chefspec/api/osx_profile.rb', line 58 def remove_osx_profile(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:osx_profile, :remove, resource_name) end |