Module: ChefSpec::API::WindowsServiceMatchers
- Defined in:
- lib/chefspec/api/windows_service.rb
Overview
Instance Method Summary collapse
-
#configure_startup_windows_service(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a
windows_serviceresource exists in the Chef run with the action:configure_startup. -
#disable_windows_service(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a
windows_serviceresource exists in the Chef run with the action:disable. -
#enable_windows_service(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a
windows_serviceresource exists in the Chef run with the action:enable. -
#reload_windows_service(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a
windows_serviceresource exists in the Chef run with the action:reload. -
#restart_windows_service(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a
windows_serviceresource exists in the Chef run with the action:restart. -
#start_windows_service(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a
windows_serviceresource exists in the Chef run with the action:start. -
#stop_windows_service(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a
windows_serviceresource exists in the Chef run with the action:stop.
Instance Method Details
#configure_startup_windows_service(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a windows_service resource exists in the Chef run with the action :configure_startup. Given a Chef Recipe that configures startup for “BITS” as a windows_service:
windows_service 'BITS' do
action :configure_startup
end
To test the content rendered by a windows_service, see RenderFileMatchers.
The Examples section demonstrates the different ways to test a windows_service resource with ChefSpec.
42 43 44 |
# File 'lib/chefspec/api/windows_service.rb', line 42 def configure_startup_windows_service(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:windows_service, :configure_startup, resource_name) end |
#disable_windows_service(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a windows_service resource exists in the Chef run with the action :disable. Given a Chef Recipe that disables “BITS” as a windows_service:
windows_service 'BITS' do
action :disable
end
To test the content rendered by a windows_service, see RenderFileMatchers.
The Examples section demonstrates the different ways to test a windows_service resource with ChefSpec.
82 83 84 |
# File 'lib/chefspec/api/windows_service.rb', line 82 def disable_windows_service(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:windows_service, :disable, resource_name) end |
#enable_windows_service(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a windows_service resource exists in the Chef run with the action :enable. Given a Chef Recipe that enables “BITS” as a windows_service:
windows_service 'BITS' do
action :enable
end
To test the content rendered by a windows_service, see RenderFileMatchers.
The Examples section demonstrates the different ways to test a windows_service resource with ChefSpec.
122 123 124 |
# File 'lib/chefspec/api/windows_service.rb', line 122 def enable_windows_service(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:windows_service, :enable, resource_name) end |
#reload_windows_service(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a windows_service resource exists in the Chef run with the action :reload. Given a Chef Recipe that reloads “BITS” as a windows_service:
windows_service 'BITS' do
action :reload
end
To test the content rendered by a windows_service, see RenderFileMatchers.
The Examples section demonstrates the different ways to test a windows_service resource with ChefSpec.
162 163 164 |
# File 'lib/chefspec/api/windows_service.rb', line 162 def reload_windows_service(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:windows_service, :reload, resource_name) end |
#restart_windows_service(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a windows_service resource exists in the Chef run with the action :restart. Given a Chef Recipe that restarts “BITS” as a windows_service:
windows_service 'BITS' do
action :restart
end
To test the content rendered by a windows_service, see RenderFileMatchers.
The Examples section demonstrates the different ways to test a windows_service resource with ChefSpec.
202 203 204 |
# File 'lib/chefspec/api/windows_service.rb', line 202 def restart_windows_service(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:windows_service, :restart, resource_name) end |
#start_windows_service(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a windows_service resource exists in the Chef run with the action :start. Given a Chef Recipe that starts “BITS” as a windows_service:
windows_service 'BITS' do
action :start
end
To test the content rendered by a windows_service, see RenderFileMatchers.
The Examples section demonstrates the different ways to test a windows_service resource with ChefSpec.
242 243 244 |
# File 'lib/chefspec/api/windows_service.rb', line 242 def start_windows_service(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:windows_service, :start, resource_name) end |
#stop_windows_service(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a windows_service resource exists in the Chef run with the action :stop. Given a Chef Recipe that stops “BITS” as a windows_service:
windows_service 'BITS' do
action :stop
end
To test the content rendered by a windows_service, see RenderFileMatchers.
The Examples section demonstrates the different ways to test a windows_service resource with ChefSpec.
282 283 284 |
# File 'lib/chefspec/api/windows_service.rb', line 282 def stop_windows_service(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:windows_service, :stop, resource_name) end |