opscode/chef — pull request #1239 by szymonpk (2014-01-30 13:41:38+00:00)
Title: CHEF-4381 Chef::Provider::Service::Invokercd does not work at all 

I've rewritten invoke provider, it passes all tests. However I'm not sure what to do with `determine_current_status!` method. I've had to change one line there, any suggestions are welcome.

$ bundle exec rspec spec/unit/provider/service/invokercd_service_spec.rb
ProductName:	Mac OS X
ProductVersion:	10.9.1
BuildVersion:	13B42
Run options:
include {:focus=>true}
exclude {:provider=>#, :arch=>#, :requires_root_or_running_windows=>true, :requires_root=>true, :ruby_gte_20_only=>true, :ruby_20_only=>true, :ruby_18_only=>true, :selinux_only=>true, :system_windows_service_gem_only=>true, :solaris_only=>true, :windows_domain_joined_only=>true, :windows32_only=>true, :windows64_only=>true, :win2k3_only=>true, :windows_only=>true, :volatile=>true, :external=>true}

All examples were filtered out; ignoring {:focus=>true}

Chef::Provider::Service::Invokercd load_current_resource
should create a current resource with the name of the new resource
should set the current resources service name to the new resources service name
should return the current resource
when the service supports status
should run '/usr/sbin/invoke-rc.d service_name status'
should set running to true if the status command returns 0
should set running to false if the status command returns anything except 0
should set running to false if the status command raises
when a status command has been specified
should run the services status command if one has been specified
when the node has not specified a ps command
should raise error if the node has a nil ps attribute and no other means to get status
should raise error if the node has an empty ps attribute and no other means to get status
when we have a 'ps' attribute
should shell_out! the node's ps command
should set running to true if the regex matches the output
should set running to false if the regex doesn't match
should raise an exception if ps fails
when starting the service
should call the start command if one is specified
should call '/usr/sbin/invoke-rc.d service_name start' if no start command is specified
Chef::Provider::Service::Invokercd stop_service
should call the stop command if one is specified
should call '/usr/sbin/invoke-rc.d service_name stop' if no stop command is specified
when restarting a service
should call 'restart' on the service_name if the resource supports it
should call the restart_command if one has been specified
should just call stop, then start when the resource doesn't support restart and no restart_command is specified
when reloading a service
should call 'reload' on the service if it supports it
should should run the user specified reload command if one is specified and the service doesn't support reload

Finished in 0.04888 seconds
23 examples, 0 failures