Module: ChefSpec::API::Notifications
- Defined in:
- lib/chefspec/api/notifications.rb
Instance Method Summary collapse
-
#notify(signature) ⇒ ChefSpec::Matchers::NotificationsMatcher
Assert that a resource notifies another.
Instance Method Details
#notify(signature) ⇒ ChefSpec::Matchers::NotificationsMatcher
Assert that a resource notifies another. Given a Chef Recipe that notifies a template resource to restart apache:
template '/etc/apache2/config' do
notifies :restart, 'service[apache2]'
end
The Examples section demonstrates the different ways to test an notifications on a resource with ChefSpec.
34 35 36 |
# File 'lib/chefspec/api/notifications.rb', line 34 def notify(signature) ChefSpec::Matchers::NotificationsMatcher.new(signature) end |