From 686113531d23f30e9973d659c456ae33eb9cff1f Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Fri, 5 Feb 2016 15:00:00 -0800 Subject: 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 --- spec/unit/provider/service/arch_service_spec.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'spec/unit/provider/service/arch_service_spec.rb') 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 -- cgit v1.2.1