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/arch_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/arch_service_spec.rb')
-rw-r--r-- | spec/unit/provider/service/arch_service_spec.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/unit/provider/service/arch_service_spec.rb b/spec/unit/provider/service/arch_service_spec.rb index 9272a8bd96..47f874cc0e 100644 --- a/spec/unit/provider/service/arch_service_spec.rb +++ b/spec/unit/provider/service/arch_service_spec.rb @@ -26,14 +26,14 @@ require "ostruct" describe Chef::Provider::Service::Arch, "load_current_resource" do before(:each) do @node = Chef::Node.new - @node.automatic_attrs[:command] = {:ps => "ps -ef"} + @node.automatic_attrs[:command] = { :ps => "ps -ef" } @events = Chef::EventDispatch::Dispatcher.new @run_context = Chef::RunContext.new(@node, {}, @events) @new_resource = Chef::Resource::Service.new("chef") @new_resource.pattern("chef") - @new_resource.supports({:status => false}) + @new_resource.supports({ :status => false }) @provider = Chef::Provider::Service::Arch.new(@new_resource, @run_context) @@ -51,7 +51,7 @@ describe Chef::Provider::Service::Arch, "load_current_resource" do describe "when the service supports status" do before do - @new_resource.supports({:status => true}) + @new_resource.supports({ :status => true }) end it "should run '/etc/rc.d/service_name status'" do @@ -92,14 +92,14 @@ describe Chef::Provider::Service::Arch, "load_current_resource" do end it "should raise error if the node has a nil ps attribute and no other means to get status" do - @node.automatic_attrs[:command] = {:ps => nil} + @node.automatic_attrs[:command] = { :ps => nil } @provider.define_resource_requirements @provider.action = :start expect { @provider.process_resource_requirements }.to raise_error(Chef::Exceptions::Service) end it "should raise error if the node has an empty ps attribute and no other means to get status" do - @node.automatic_attrs[:command] = {:ps => ""} + @node.automatic_attrs[:command] = { :ps => "" } @provider.define_resource_requirements @provider.action = :start expect { @provider.process_resource_requirements }.to raise_error(Chef::Exceptions::Service) @@ -125,7 +125,7 @@ DEFAULT_PS @status = double("Status", :exitstatus => 0, :stdout => @stdout) allow(@provider).to receive(:shell_out!).and_return(@status) - @node.automatic_attrs[:command] = {:ps => "ps -ef"} + @node.automatic_attrs[:command] = { :ps => "ps -ef" } end it "determines the service is running when it appears in ps" do @@ -274,7 +274,7 @@ RUNNING_PS # end it "should call 'restart' on the service_name if the resource supports it" do - allow(@new_resource).to receive(:supports).and_return({:restart => true}) + allow(@new_resource).to receive(:supports).and_return({ :restart => true }) expect(@provider).to receive(:shell_out_with_systems_locale!).with("/etc/rc.d/#{@new_resource.service_name} restart") @provider.restart_service() end @@ -309,7 +309,7 @@ RUNNING_PS # end it "should call 'reload' on the service if it supports it" do - allow(@new_resource).to receive(:supports).and_return({:reload => true}) + allow(@new_resource).to receive(:supports).and_return({ :reload => true }) expect(@provider).to receive(:shell_out_with_systems_locale!).with("/etc/rc.d/#{@new_resource.service_name} reload") @provider.reload_service() end |