diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-02-05 15:00:00 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-02-05 15:00:00 -0800 |
commit | 686113531d23f30e9973d659c456ae33eb9cff1f (patch) | |
tree | f225de7251a8b49b8d183dd168bab0a0addbe23f /spec/unit/provider/service/solaris_smf_service_spec.rb | |
parent | d1cf34b059a16a81e0fc48de52ba29863bb41fe6 (diff) | |
download | chef-686113531d23f30e9973d659c456ae33eb9cff1f.tar.gz |
autofixing whitespace cops
4174 Style/SpaceInsideHashLiteralBraces
1860 Style/SpaceAroundOperators
1336 Style/SpaceInsideBlockBraces
1292 Style/AlignHash
997 Style/SpaceAfterComma
860 Style/SpaceAroundEqualsInParameterDefault
310 Style/EmptyLines
294 Style/IndentationConsistency
267 Style/TrailingWhitespace
238 Style/ExtraSpacing
212 Style/SpaceBeforeBlockBraces
166 Style/MultilineOperationIndentation
144 Style/TrailingBlankLines
120 Style/EmptyLineBetweenDefs
101 Style/IndentationWidth
82 Style/SpaceAroundBlockParameters
40 Style/EmptyLinesAroundMethodBody
29 Style/EmptyLinesAroundAccessModifier
1 Style/RescueEnsureAlignment
Diffstat (limited to 'spec/unit/provider/service/solaris_smf_service_spec.rb')
-rw-r--r-- | spec/unit/provider/service/solaris_smf_service_spec.rb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/spec/unit/provider/service/solaris_smf_service_spec.rb b/spec/unit/provider/service/solaris_smf_service_spec.rb index 94d123ef1a..c6835bed64 100644 --- a/spec/unit/provider/service/solaris_smf_service_spec.rb +++ b/spec/unit/provider/service/solaris_smf_service_spec.rb @@ -20,7 +20,7 @@ require "spec_helper" describe Chef::Provider::Service::Solaris do before(:each) do - @node =Chef::Node.new + @node = Chef::Node.new @events = Chef::EventDispatch::Dispatcher.new @run_context = Chef::RunContext.new(@node, {}, @events) @@ -116,18 +116,18 @@ describe Chef::Provider::Service::Solaris do describe "when discovering the current service state" do it "should create a current resource with the name of the new resource" do - expect(@provider).to receive(:shell_out!).with("/bin/svcs", "-l", "chef", {:returns=>[0, 1]}).and_return(@enabled_svc_status) + expect(@provider).to receive(:shell_out!).with("/bin/svcs", "-l", "chef", { :returns => [0, 1] }).and_return(@enabled_svc_status) expect(Chef::Resource::Service).to receive(:new).and_return(@current_resource) @provider.load_current_resource end it "should return the current resource" do - expect(@provider).to receive(:shell_out!).with("/bin/svcs", "-l", "chef", {:returns=>[0, 1]}).and_return(@enabled_svc_status) + expect(@provider).to receive(:shell_out!).with("/bin/svcs", "-l", "chef", { :returns => [0, 1] }).and_return(@enabled_svc_status) expect(@provider.load_current_resource).to eql(@current_resource) end it "should call '/bin/svcs -l service_name'" do - expect(@provider).to receive(:shell_out!).with("/bin/svcs", "-l", "chef", {:returns=>[0, 1]}).and_return(@enabled_svc_status) + expect(@provider).to receive(:shell_out!).with("/bin/svcs", "-l", "chef", { :returns => [0, 1] }).and_return(@enabled_svc_status) @provider.load_current_resource end @@ -162,7 +162,7 @@ describe Chef::Provider::Service::Solaris do end it "should call svcadm enable -s chef" do - expect(@provider).to receive(:shell_out!).with("/bin/svcs", "-l", "chef", {:returns=>[0, 1]}).and_return(@enabled_svc_status) + expect(@provider).to receive(:shell_out!).with("/bin/svcs", "-l", "chef", { :returns => [0, 1] }).and_return(@enabled_svc_status) expect(@provider).not_to receive(:shell_out!).with("/usr/sbin/svcadm", "clear", @current_resource.service_name) expect(@provider).to receive(:shell_out!).with("/usr/sbin/svcadm", "enable", "-s", @current_resource.service_name).and_return(@success) @provider.load_current_resource @@ -172,7 +172,7 @@ describe Chef::Provider::Service::Solaris do end it "should call svcadm enable -s chef for start_service" do - expect(@provider).to receive(:shell_out!).with("/bin/svcs", "-l", "chef", {:returns=>[0, 1]}).and_return(@enabled_svc_status) + expect(@provider).to receive(:shell_out!).with("/bin/svcs", "-l", "chef", { :returns => [0, 1] }).and_return(@enabled_svc_status) expect(@provider).not_to receive(:shell_out!).with("/usr/sbin/svcadm", "clear", @current_resource.service_name) expect(@provider).to receive(:shell_out!).with("/usr/sbin/svcadm", "enable", "-s", @current_resource.service_name).and_return(@success) @provider.load_current_resource @@ -182,7 +182,7 @@ describe Chef::Provider::Service::Solaris do it "should call svcadm clear chef for start_service when state maintenance" do # we are in maint mode - expect(@provider).to receive(:shell_out!).with("/bin/svcs", "-l", "chef", {:returns=>[0, 1]}).and_return(@maintenance_svc_status) + expect(@provider).to receive(:shell_out!).with("/bin/svcs", "-l", "chef", { :returns => [0, 1] }).and_return(@maintenance_svc_status) expect(@provider).to receive(:shell_out!).with("/usr/sbin/svcadm", "clear", @current_resource.service_name).and_return(@success) expect(@provider).to receive(:shell_out!).with("/usr/sbin/svcadm", "enable", "-s", @current_resource.service_name).and_return(@success) @@ -191,7 +191,7 @@ describe Chef::Provider::Service::Solaris do expect(@provider.enable_service).to be_truthy # now we are enabled - expect(@provider).to receive(:shell_out!).with("/bin/svcs", "-l", "chef", {:returns=>[0, 1]}).and_return(@enabled_svc_status) + expect(@provider).to receive(:shell_out!).with("/bin/svcs", "-l", "chef", { :returns => [0, 1] }).and_return(@enabled_svc_status) @provider.load_current_resource expect(@current_resource.enabled).to be_truthy @@ -204,7 +204,7 @@ describe Chef::Provider::Service::Solaris do end it "should call svcadm disable -s chef" do - expect(@provider).to receive(:shell_out!).with("/bin/svcs", "-l", "chef", {:returns=>[0, 1]}).and_return(@disabled_svc_status) + expect(@provider).to receive(:shell_out!).with("/bin/svcs", "-l", "chef", { :returns => [0, 1] }).and_return(@disabled_svc_status) expect(@provider).to receive(:shell_out!).with("/usr/sbin/svcadm", "disable", "-s", "chef").and_return(@success) @provider.load_current_resource expect(@provider.disable_service).to be_truthy @@ -212,7 +212,7 @@ describe Chef::Provider::Service::Solaris do end it "should call svcadm disable -s chef for stop_service" do - expect(@provider).to receive(:shell_out!).with("/bin/svcs", "-l", "chef", {:returns=>[0, 1]}).and_return(@disabled_svc_status) + expect(@provider).to receive(:shell_out!).with("/bin/svcs", "-l", "chef", { :returns => [0, 1] }).and_return(@disabled_svc_status) expect(@provider).to receive(:shell_out!).with("/usr/sbin/svcadm", "disable", "-s", "chef").and_return(@success) @provider.load_current_resource expect(@provider.stop_service).to be_truthy @@ -224,7 +224,7 @@ describe Chef::Provider::Service::Solaris do describe "when reloading the service" do before(:each) do @provider.current_resource = @current_resource - allow(@provider).to receive(:shell_out!).with("/bin/svcs", "-l", "chef", {:returns=>[0, 1]}).and_return(@enabled_svc_status) + allow(@provider).to receive(:shell_out!).with("/bin/svcs", "-l", "chef", { :returns => [0, 1] }).and_return(@enabled_svc_status) end it "should call svcadm refresh chef" do @@ -237,7 +237,7 @@ describe Chef::Provider::Service::Solaris do describe "when the service doesn't exist" do before(:each) do @provider.current_resource = @current_resource - expect(@provider).to receive(:shell_out!).with("/bin/svcs", "-l", "chef", {:returns=>[0, 1]}).and_return(@no_svc_status) + expect(@provider).to receive(:shell_out!).with("/bin/svcs", "-l", "chef", { :returns => [0, 1] }).and_return(@no_svc_status) end it "should be marked not running" do |