Module: ChefSpec::API::Subscriptions
- Defined in:
- lib/chefspec/api/subscriptions.rb
Instance Method Summary collapse
-
#subscribe_to(signature) ⇒ ChefSpec::Matchers::NotificationsMatcher
Assert that a resource subscribes to another.
Instance Method Details
#subscribe_to(signature) ⇒ ChefSpec::Matchers::NotificationsMatcher
Assert that a resource subscribes to another. Given a Chef Recipe that subscribes a template resource to restart apache:
service 'apache2' do
subscribes :create, 'template[/etc/apache2/config]'
end
The Examples section demonstrates the different ways to test a subscription on a resource with ChefSpec.
31 32 33 |
# File 'lib/chefspec/api/subscriptions.rb', line 31 def subscribe_to(signature) ChefSpec::Matchers::SubscribesMatcher.new(signature) end |