diff options
author | Tim Smith <tsmith@chef.io> | 2018-07-10 22:51:17 -0700 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-07-10 22:56:11 -0700 |
commit | 26a350996cab459b6483e67a66faf6030bb46312 (patch) | |
tree | aaa00ceb834e017391022e7940152f01fed7ef3c /spec/unit/provider/service | |
parent | 293eb409c165b0080178f378211dde1cbb81c916 (diff) | |
download | chef-26a350996cab459b6483e67a66faf6030bb46312.tar.gz |
Update wording in resource specs for attributes -> properties
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec/unit/provider/service')
7 files changed, 16 insertions, 16 deletions
diff --git a/spec/unit/provider/service/aixinit_service_spec.rb b/spec/unit/provider/service/aixinit_service_spec.rb index 6a586a0240..53dc16fc47 100644 --- a/spec/unit/provider/service/aixinit_service_spec.rb +++ b/spec/unit/provider/service/aixinit_service_spec.rb @@ -35,7 +35,7 @@ describe Chef::Provider::Service::AixInit do end describe "load_current_resource" do - it "sets current resource attributes" do + it "sets current resource properties" do expect(@provider).to receive(:set_current_resource_attributes) @provider.load_current_resource diff --git a/spec/unit/provider/service/arch_service_spec.rb b/spec/unit/provider/service/arch_service_spec.rb index 18db25fef9..a7a9602750 100644 --- a/spec/unit/provider/service/arch_service_spec.rb +++ b/spec/unit/provider/service/arch_service_spec.rb @@ -91,14 +91,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 + it "should raise error if the node has a nil ps property and no other means to get status" do @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 + it "should raise error if the node has an empty ps property and no other means to get status" do @node.automatic_attrs[:command] = { ps: "" } @provider.define_resource_requirements @provider.action = :start diff --git a/spec/unit/provider/service/freebsd_service_spec.rb b/spec/unit/provider/service/freebsd_service_spec.rb index 954ef3d153..b4330b976c 100644 --- a/spec/unit/provider/service/freebsd_service_spec.rb +++ b/spec/unit/provider/service/freebsd_service_spec.rb @@ -136,7 +136,7 @@ describe Chef::Provider::Service::Freebsd do end end - context "when we have a 'ps' attribute" do + context "when we have a 'ps' property" do let(:stdout) do StringIO.new(<<~PS_SAMPLE) 413 ?? Ss 0:02.51 /usr/sbin/syslogd -s diff --git a/spec/unit/provider/service/init_service_spec.rb b/spec/unit/provider/service/init_service_spec.rb index 7bbe2c6363..07668ef8ab 100644 --- a/spec/unit/provider/service/init_service_spec.rb +++ b/spec/unit/provider/service/init_service_spec.rb @@ -108,7 +108,7 @@ PS describe "when the node has not specified a ps command" do - it "should raise an error if the node has a nil ps attribute" do + it "should raise an error if the node has a nil ps property" do @node.automatic_attrs[:command] = { ps: nil } @provider.load_current_resource @provider.action = :start @@ -116,7 +116,7 @@ PS expect { @provider.process_resource_requirements }.to raise_error(Chef::Exceptions::Service) end - it "should raise an error if the node has an empty ps attribute" do + it "should raise an error if the node has an empty ps property" do @node.automatic_attrs[:command] = { ps: "" } @provider.load_current_resource @provider.action = :start @@ -126,7 +126,7 @@ PS end - describe "when we have a 'ps' attribute" do + describe "when we have a 'ps' property" do it "should shell_out! the node's ps command" do expect(@provider).to receive(:shell_out!).and_return(@status) @provider.load_current_resource diff --git a/spec/unit/provider/service/invokercd_service_spec.rb b/spec/unit/provider/service/invokercd_service_spec.rb index 2e30c16da4..822062a82b 100644 --- a/spec/unit/provider/service/invokercd_service_spec.rb +++ b/spec/unit/provider/service/invokercd_service_spec.rb @@ -94,14 +94,14 @@ PS end describe "when the node has not specified a ps command" do - it "should raise error if the node has a nil ps attribute and no other means to get status" do + it "should raise error if the node has a nil ps property and no other means to get status" do @node.automatic_attrs[:command] = { ps: nil } @provider.action = :start @provider.define_resource_requirements 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 + it "should raise error if the node has an empty ps property and no other means to get status" do @node.automatic_attrs[:command] = { ps: "" } @provider.action = :start @provider.define_resource_requirements @@ -110,7 +110,7 @@ PS end - describe "when we have a 'ps' attribute" do + describe "when we have a 'ps' property" do it "should shell_out! the node's ps command" do @status = double("Status", exitstatus: 0, stdout: @stdout) expect(@provider).to receive(:shell_out!).with(@node[:command][:ps]).and_return(@status) diff --git a/spec/unit/provider/service/simple_service_spec.rb b/spec/unit/provider/service/simple_service_spec.rb index 0529462d2f..4ea1d520b7 100644 --- a/spec/unit/provider/service/simple_service_spec.rb +++ b/spec/unit/provider/service/simple_service_spec.rb @@ -50,19 +50,19 @@ NOMOCKINGSTRINGSPLZ @provider.load_current_resource end - it "should raise error if the node has a nil ps attribute and no other means to get status" do + it "should raise error if the node has a nil ps property and no other means to get status" do @node.automatic_attrs[:command] = { ps: nil } @provider.define_resource_requirements 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 + it "should raise error if the node has an empty ps property and no other means to get status" do @node.automatic_attrs[:command] = { ps: "" } @provider.define_resource_requirements expect { @provider.process_resource_requirements }.to raise_error(Chef::Exceptions::Service) end - describe "when we have a 'ps' attribute" do + describe "when we have a 'ps' property" do it "should shell_out! the node's ps command" do expect(@provider).to receive(:shell_out!).with(@node[:command][:ps]).and_return(@status) @provider.load_current_resource diff --git a/spec/unit/provider/service/windows_spec.rb b/spec/unit/provider/service/windows_spec.rb index dd59089418..6a82157a64 100644 --- a/spec/unit/provider/service/windows_spec.rb +++ b/spec/unit/provider/service/windows_spec.rb @@ -382,7 +382,7 @@ describe Chef::Provider::Service::Windows, "load_current_resource", :windows_onl provider.action_configure end - # Attributes that are Strings + # properties that are Strings %i{binary_path_name load_order_group dependencies run_as_user display_name description}.each do |attr| it "configures service if #{attr} has changed" do @@ -394,7 +394,7 @@ describe Chef::Provider::Service::Windows, "load_current_resource", :windows_onl end end - # Attributes that are Integers + # properties that are Integers %i{service_type error_control}.each do |attr| it "configures service if #{attr} has changed" do provider.current_resource.send("#{attr}=", 1) @@ -570,7 +570,7 @@ describe Chef::Provider::Service::Windows, "load_current_resource", :windows_onl new_resource.run_as_password("Wensleydale") end - it "calls #grant_service_logon if the :run_as_user and :run_as_password attributes are present" do + it "calls #grant_service_logon if the :run_as_user and :run_as_password properties are present" do expect(Win32::Service).to receive(:start) expect(provider).to receive(:grant_service_logon).and_return(true) provider.start_service |