diff options
Diffstat (limited to 'spec/unit/provider/service/aixinit_service_spec.rb')
-rw-r--r-- | spec/unit/provider/service/aixinit_service_spec.rb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/spec/unit/provider/service/aixinit_service_spec.rb b/spec/unit/provider/service/aixinit_service_spec.rb index 9977343daa..9274c3001b 100644 --- a/spec/unit/provider/service/aixinit_service_spec.rb +++ b/spec/unit/provider/service/aixinit_service_spec.rb @@ -16,12 +16,12 @@ # limitations under the License. # -require 'spec_helper' +require "spec_helper" describe Chef::Provider::Service::AixInit do before(:each) do @node = Chef::Node.new - @node.automatic_attrs[:command] = {:ps => 'fuuuu'} + @node.automatic_attrs[:command] = {:ps => "fuuuu"} @events = Chef::EventDispatch::Dispatcher.new @run_context = Chef::RunContext.new(@node, {}, @events) @@ -102,7 +102,7 @@ describe Chef::Provider::Service::AixInit do context "when the service doesn't set a priority" do it "creates symlink with status S" do - expect(@provider).to receive(:create_symlink).with(2,'S','') + expect(@provider).to receive(:create_symlink).with(2,"S","") @provider.enable_service end @@ -114,7 +114,7 @@ describe Chef::Provider::Service::AixInit do end it "creates a symlink with status S and a priority" do - expect(@provider).to receive(:create_symlink).with(2,'S',75) + expect(@provider).to receive(:create_symlink).with(2,"S",75) @provider.enable_service end @@ -127,8 +127,8 @@ describe Chef::Provider::Service::AixInit do end it "create symlink with status start (S) or stop (K) and a priority " do - expect(@provider).to receive(:create_symlink).with(2,'S',20) - expect(@provider).to receive(:create_symlink).with(3,'K',10) + expect(@provider).to receive(:create_symlink).with(2,"S",20) + expect(@provider).to receive(:create_symlink).with(3,"K",10) @provider.enable_service end @@ -142,7 +142,7 @@ describe Chef::Provider::Service::AixInit do context "when the service doesn't set a priority" do it "creates symlinks with status stop (K)" do - expect(@provider).to receive(:create_symlink).with(2,'K','') + expect(@provider).to receive(:create_symlink).with(2,"K","") @provider.disable_service end @@ -154,7 +154,7 @@ describe Chef::Provider::Service::AixInit do end it "create symlink with status stop (k) and a priority " do - expect(@provider).to receive(:create_symlink).with(2,'K',25) + expect(@provider).to receive(:create_symlink).with(2,"K",25) @provider.disable_service end @@ -167,7 +167,7 @@ describe Chef::Provider::Service::AixInit do end it "create symlink with status stop (k) and a priority " do - expect(@provider).to receive(:create_symlink).with(3,'K',90) + expect(@provider).to receive(:create_symlink).with(3,"K",90) @provider.disable_service end @@ -231,7 +231,7 @@ describe Chef::Provider::Service::AixInit do it "the service is enabled" do expect(@provider.current_resource).to receive(:enabled).with(true) - expect(@provider.current_resource).to receive(:priority).with('') + expect(@provider.current_resource).to receive(:priority).with("") @provider.set_current_resource_attributes end @@ -240,7 +240,7 @@ describe Chef::Provider::Service::AixInit do context "when rc2.d contains only stop script (without priority)" do before do files = ["/etc/rc.d/rc2.d/Kapache"] - @priority = {2 => [:stop, '']} + @priority = {2 => [:stop, ""]} allow(Dir).to receive(:glob).with(["/etc/rc.d/rc2.d/[SK][0-9][0-9]#{@new_resource.service_name}", "/etc/rc.d/rc2.d/[SK]#{@new_resource.service_name}"]).and_return(files) end @@ -257,7 +257,7 @@ describe Chef::Provider::Service::AixInit do files = ["/etc/rc.d/rc2.d/Sapache", "/etc/rc.d/rc2.d/Kapache"] # FIXME: this is clearly buggy the duplicated keys do not work #@priority = {2 => [:start, ''], 2 => [:stop, '']} - @priority = {2 => [:stop, '']} + @priority = {2 => [:stop, ""]} allow(Dir).to receive(:glob).with(["/etc/rc.d/rc2.d/[SK][0-9][0-9]#{@new_resource.service_name}", "/etc/rc.d/rc2.d/[SK]#{@new_resource.service_name}"]).and_return(files) end |