summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-07-10 22:51:17 -0700
committerTim Smith <tsmith@chef.io>2018-07-10 22:56:11 -0700
commit26a350996cab459b6483e67a66faf6030bb46312 (patch)
treeaaa00ceb834e017391022e7940152f01fed7ef3c /spec
parent293eb409c165b0080178f378211dde1cbb81c916 (diff)
downloadchef-26a350996cab459b6483e67a66faf6030bb46312.tar.gz
Update wording in resource specs for attributes -> properties
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/provider/cron_spec.rb6
-rw-r--r--spec/unit/provider/execute_spec.rb2
-rw-r--r--spec/unit/provider/file/content_spec.rb4
-rw-r--r--spec/unit/provider/group/groupadd_spec.rb18
-rw-r--r--spec/unit/provider/group_spec.rb18
-rw-r--r--spec/unit/provider/ifconfig/aix_spec.rb6
-rw-r--r--spec/unit/provider/package/freebsd/pkg_spec.rb2
-rw-r--r--spec/unit/provider/package/windows/exe_spec.rb2
-rw-r--r--spec/unit/provider/remote_file/cache_control_data_spec.rb2
-rw-r--r--spec/unit/provider/route_spec.rb2
-rw-r--r--spec/unit/provider/service/aixinit_service_spec.rb2
-rw-r--r--spec/unit/provider/service/arch_service_spec.rb4
-rw-r--r--spec/unit/provider/service/freebsd_service_spec.rb2
-rw-r--r--spec/unit/provider/service/init_service_spec.rb6
-rw-r--r--spec/unit/provider/service/invokercd_service_spec.rb6
-rw-r--r--spec/unit/provider/service/simple_service_spec.rb6
-rw-r--r--spec/unit/provider/service/windows_spec.rb6
-rw-r--r--spec/unit/provider/subversion_spec.rb2
-rw-r--r--spec/unit/provider/user/pw_spec.rb18
-rw-r--r--spec/unit/provider/user/windows_spec.rb16
-rw-r--r--spec/unit/provider/user_spec.rb26
-rw-r--r--spec/unit/resource/file_spec.rb2
-rw-r--r--spec/unit/resource/mdadm_spec.rb16
-rw-r--r--spec/unit/resource/osx_profile_spec.rb6
-rw-r--r--spec/unit/resource/powershell_script_spec.rb2
-rw-r--r--spec/unit/resource/scm_spec.rb10
-rw-r--r--spec/unit/resource/subversion_spec.rb4
-rw-r--r--spec/unit/resource/template_spec.rb2
-rw-r--r--spec/unit/resource/windows_package_spec.rb2
-rw-r--r--spec/unit/resource/windows_service_spec.rb6
-rw-r--r--spec/unit/resource/yum_package_spec.rb4
-rw-r--r--spec/unit/resource_reporter_spec.rb4
32 files changed, 107 insertions, 107 deletions
diff --git a/spec/unit/provider/cron_spec.rb b/spec/unit/provider/cron_spec.rb
index 67d578e2ea..03e3599b35 100644
--- a/spec/unit/provider/cron_spec.rb
+++ b/spec/unit/provider/cron_spec.rb
@@ -401,9 +401,9 @@ CRONTAB
@provider.current_resource = @current_resource
end
- [:minute, :hour, :day, :month, :weekday, :command, :mailto, :path, :shell, :home].each do |attribute|
- it "should return true if #{attribute} doesn't match" do
- @new_resource.send(attribute, "something_else")
+ [:minute, :hour, :day, :month, :weekday, :command, :mailto, :path, :shell, :home].each do |property|
+ it "should return true if #{property} doesn't match" do
+ @new_resource.send(property, "something_else")
expect(@provider.cron_different?).to eql(true)
end
end
diff --git a/spec/unit/provider/execute_spec.rb b/spec/unit/provider/execute_spec.rb
index 622d54af37..9718a012da 100644
--- a/spec/unit/provider/execute_spec.rb
+++ b/spec/unit/provider/execute_spec.rb
@@ -111,7 +111,7 @@ describe Chef::Provider::Execute do
expect(new_resource).to be_updated
end
- it "should honor sensitive attribute" do
+ it "should honor sensitive property" do
new_resource.sensitive true
# Since the resource is sensitive, it should not have :live_stream set
opts.delete(:live_stream)
diff --git a/spec/unit/provider/file/content_spec.rb b/spec/unit/provider/file/content_spec.rb
index e65d094327..bd747764bd 100644
--- a/spec/unit/provider/file/content_spec.rb
+++ b/spec/unit/provider/file/content_spec.rb
@@ -50,7 +50,7 @@ describe Chef::Provider::File::Content do
Chef::Provider::File::Content.new(new_resource, current_resource, run_context)
end
- describe "when the resource has a content attribute set" do
+ describe "when the resource has a content property set" do
before do
allow(new_resource).to receive(:content).and_return("Do do do do, do do do do, do do do do, do do do do")
@@ -100,7 +100,7 @@ describe Chef::Provider::File::Content do
end
- describe "when the resource does not have a content attribute set" do
+ describe "when the resource does not have a content property set" do
before do
allow(new_resource).to receive(:content).and_return(nil)
diff --git a/spec/unit/provider/group/groupadd_spec.rb b/spec/unit/provider/group/groupadd_spec.rb
index 1aae4fc7f1..84997a258d 100644
--- a/spec/unit/provider/group/groupadd_spec.rb
+++ b/spec/unit/provider/group/groupadd_spec.rb
@@ -49,23 +49,23 @@ describe Chef::Provider::Group::Groupadd do
gid: "-g",
}
- field_list.each do |attribute, option|
- it "should check for differences in #{attribute} between the current and new resources" do
- expect(new_resource).to receive(attribute)
- expect(current_resource).to receive(attribute)
+ field_list.each do |property, option|
+ it "should check for differences in #{property} between the current and new resources" do
+ expect(new_resource).to receive(property)
+ expect(current_resource).to receive(property)
provider.set_options
end
- it "should set the option for #{attribute} if the new resources #{attribute} is not null" do
- allow(new_resource).to receive(attribute).and_return("wowaweea")
- expect(provider.set_options).to eql([ option, new_resource.send(attribute), new_resource.group_name])
+ it "should set the option for #{property} if the new resources #{property} is not null" do
+ allow(new_resource).to receive(property).and_return("wowaweea")
+ expect(provider.set_options).to eql([ option, new_resource.send(property), new_resource.group_name])
end
end
it "should combine all the possible options" do
match_array = []
- field_list.sort_by { |a| a[0] }.each do |attribute, option|
- allow(new_resource).to receive(attribute).and_return("hola")
+ field_list.sort_by { |a| a[0] }.each do |property, option|
+ allow(new_resource).to receive(property).and_return("hola")
match_array << option
match_array << "hola"
end
diff --git a/spec/unit/provider/group_spec.rb b/spec/unit/provider/group_spec.rb
index 437b8c45ea..bacb711d1b 100644
--- a/spec/unit/provider/group_spec.rb
+++ b/spec/unit/provider/group_spec.rb
@@ -85,9 +85,9 @@ describe Chef::Provider::User do
end
describe "when determining if the system is already in the target state" do
- [ :gid, :members ].each do |attribute|
- it "should return true if #{attribute} doesn't match" do
- allow(@current_resource).to receive(attribute).and_return("looooooooooooooooooool")
+ [ :gid, :members ].each do |property|
+ it "should return true if #{property} doesn't match" do
+ allow(@current_resource).to receive(property).and_return("looooooooooooooooooool")
expect(@provider.compare_group).to be_truthy
end
end
@@ -142,7 +142,7 @@ describe Chef::Provider::User do
expect(@provider.new_resource).to be_updated
end
- it "should check to see if the group has mismatched attributes if the group exists" do
+ it "should check to see if the group has mismatched properties if the group exists" do
@provider.group_exists = true
allow(@provider).to receive(:compare_group).and_return(false)
allow(@provider).to receive(:change_desc).and_return([ ])
@@ -150,7 +150,7 @@ describe Chef::Provider::User do
expect(@provider.new_resource).not_to be_updated
end
- it "should call manage_group if the group exists and has mismatched attributes" do
+ it "should call manage_group if the group exists and has mismatched properties" do
@provider.group_exists = true
allow(@provider).to receive(:compare_group).and_return(true)
allow(@provider).to receive(:change_desc).and_return([ ])
@@ -191,7 +191,7 @@ describe Chef::Provider::User do
allow(@provider).to receive(:manage_group).and_return(true)
end
- it "should run manage_group if the group exists and has mismatched attributes" do
+ it "should run manage_group if the group exists and has mismatched properties" do
expect(@provider).to receive(:compare_group).and_return(true)
allow(@provider).to receive(:change_desc).and_return(["Some changes are going to be done."])
expect(@provider).to receive(:manage_group).and_return(true)
@@ -212,7 +212,7 @@ describe Chef::Provider::User do
@provider.run_action(:manage)
end
- it "should not run manage_group if the group exists but has no differing attributes" do
+ it "should not run manage_group if the group exists but has no differing properties" do
expect(@provider).to receive(:compare_group).and_return(false)
allow(@provider).to receive(:change_desc).and_return(["Some changes are going to be done."])
expect(@provider).not_to receive(:manage_group)
@@ -226,7 +226,7 @@ describe Chef::Provider::User do
allow(@provider).to receive(:manage_group).and_return(true)
end
- it "should run manage_group if the group exists and has mismatched attributes" do
+ it "should run manage_group if the group exists and has mismatched properties" do
expect(@provider).to receive(:compare_group).and_return(true)
allow(@provider).to receive(:change_desc).and_return(["Some changes are going to be done."])
expect(@provider).to receive(:manage_group).and_return(true)
@@ -241,7 +241,7 @@ describe Chef::Provider::User do
expect(@new_resource).to be_updated
end
- it "should not run manage_group if the group exists but has no differing attributes" do
+ it "should not run manage_group if the group exists but has no differing properties" do
expect(@provider).to receive(:compare_group).and_return(false)
allow(@provider).to receive(:change_desc).and_return(["Some changes are going to be done."])
expect(@provider).not_to receive(:manage_group)
diff --git a/spec/unit/provider/ifconfig/aix_spec.rb b/spec/unit/provider/ifconfig/aix_spec.rb
index 654b08b2c9..6acfddbedb 100644
--- a/spec/unit/provider/ifconfig/aix_spec.rb
+++ b/spec/unit/provider/ifconfig/aix_spec.rb
@@ -53,7 +53,7 @@ IFCONFIG
@new_resource.device "en0"
end
- it "should load given interface with attributes." do
+ it "should load given interface with properties." do
current_resource = @provider.load_current_resource
expect(current_resource.inet_addr).to eq("172.29.174.58")
expect(current_resource.target).to eq(@new_resource.target)
@@ -78,7 +78,7 @@ IFCONFIG
expect(@new_resource).to be_updated
end
- it "should raise exception if metric attribute is set" do
+ it "should raise exception if metric property is set" do
@new_resource.device "en0"
@new_resource.metric "1"
allow(@provider).to receive(:load_current_resource) do
@@ -86,7 +86,7 @@ IFCONFIG
@provider.instance_variable_set("@current_resource", Chef::Resource::Ifconfig.new("10.0.0.1", @run_context))
end
- expect { @provider.run_action(:add) }.to raise_error(Chef::Exceptions::Ifconfig, "interface metric attribute cannot be set for :add action")
+ expect { @provider.run_action(:add) }.to raise_error(Chef::Exceptions::Ifconfig, "interface metric property cannot be set for :add action")
end
end
diff --git a/spec/unit/provider/package/freebsd/pkg_spec.rb b/spec/unit/provider/package/freebsd/pkg_spec.rb
index 8c3e25a0f9..29a8bfef44 100644
--- a/spec/unit/provider/package/freebsd/pkg_spec.rb
+++ b/spec/unit/provider/package/freebsd/pkg_spec.rb
@@ -64,7 +64,7 @@ describe Chef::Provider::Package::Freebsd::Pkg, "load_current_resource" do
end
end
- describe "when querying for package state and attributes" do
+ describe "when querying for package state and properties" do
before do
# @new_resource = Chef::Resource::Package.new("zsh")
diff --git a/spec/unit/provider/package/windows/exe_spec.rb b/spec/unit/provider/package/windows/exe_spec.rb
index f8c4e83fc5..4f6a6121bd 100644
--- a/spec/unit/provider/package/windows/exe_spec.rb
+++ b/spec/unit/provider/package/windows/exe_spec.rb
@@ -99,7 +99,7 @@ describe Chef::Provider::Package::Windows::Exe do
end
end
- it "returns the version attribute if given" do
+ it "returns the version property if given" do
new_resource.version("v55555")
expect(provider.package_version).to eql("v55555")
end
diff --git a/spec/unit/provider/remote_file/cache_control_data_spec.rb b/spec/unit/provider/remote_file/cache_control_data_spec.rb
index 5e661ba3d7..4ea1131d28 100644
--- a/spec/unit/provider/remote_file/cache_control_data_spec.rb
+++ b/spec/unit/provider/remote_file/cache_control_data_spec.rb
@@ -182,7 +182,7 @@ describe Chef::Provider::RemoteFile::CacheControlData do
cache_control_data.checksum = fetched_file_checksum
end
- it "serializes its attributes to JSON" do
+ it "serializes its properties to JSON" do
# we have to test this separately because ruby 1.8 hash order is unstable
# so we can't count on the order of the keys in the json format.
diff --git a/spec/unit/provider/route_spec.rb b/spec/unit/provider/route_spec.rb
index ea6ddffb81..f4957d880f 100644
--- a/spec/unit/provider/route_spec.rb
+++ b/spec/unit/provider/route_spec.rb
@@ -72,7 +72,7 @@ describe Chef::Provider::Route do
expect(provider.is_running).to be_falsey
end
- it "should detect existing routes and set is_running attribute correctly" do
+ it "should detect existing routes and set is_running property correctly" do
resource = Chef::Resource::Route.new("192.168.100.0/24")
allow(resource).to receive(:gateway).and_return("192.168.132.9")
allow(resource).to receive(:device).and_return("eth0")
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
diff --git a/spec/unit/provider/subversion_spec.rb b/spec/unit/provider/subversion_spec.rb
index 5233ecb229..d3c5073b7e 100644
--- a/spec/unit/provider/subversion_spec.rb
+++ b/spec/unit/provider/subversion_spec.rb
@@ -43,7 +43,7 @@ describe Chef::Provider::Subversion do
ENV.update(@original_env)
end
- it "converts resource attributes to options for shell_out" do
+ it "converts resource properties to options for shell_out" do
expect(@provider.run_options).to eq({})
@resource.user "deployninja"
expect(@provider.run_options).to eq({ user: "deployninja" })
diff --git a/spec/unit/provider/user/pw_spec.rb b/spec/unit/provider/user/pw_spec.rb
index 7c6948bf84..0fa5eec0f0 100644
--- a/spec/unit/provider/user/pw_spec.rb
+++ b/spec/unit/provider/user/pw_spec.rb
@@ -54,23 +54,23 @@ describe Chef::Provider::User::Pw do
"uid" => "-u",
"shell" => "-s",
}
- field_list.each do |attribute, option|
- it "should check for differences in #{attribute} between the new and current resources" do
- expect(@current_resource).to receive(attribute)
- expect(@new_resource).to receive(attribute)
+ field_list.each do |property, option|
+ it "should check for differences in #{property} between the new and current resources" do
+ expect(@current_resource).to receive(property)
+ expect(@new_resource).to receive(property)
@provider.set_options
end
- it "should set the option for #{attribute} if the new resources #{attribute} is not null" do
- allow(@new_resource).to receive(attribute).and_return("hola")
- expect(@provider.set_options).to eql([ @new_resource.username, option, @new_resource.send(attribute), "-m"])
+ it "should set the option for #{property} if the new resources #{property} is not null" do
+ allow(@new_resource).to receive(property).and_return("hola")
+ expect(@provider.set_options).to eql([ @new_resource.username, option, @new_resource.send(property), "-m"])
end
end
it "should combine all the possible options" do
match_array = [ "adam" ]
- field_list.sort_by { |a| a[0] }.each do |attribute, option|
- allow(@new_resource).to receive(attribute).and_return("hola")
+ field_list.sort_by { |a| a[0] }.each do |property, option|
+ allow(@new_resource).to receive(property).and_return("hola")
match_array << option
match_array << "hola"
end
diff --git a/spec/unit/provider/user/windows_spec.rb b/spec/unit/provider/user/windows_spec.rb
index 179926e5e6..dab4814d44 100644
--- a/spec/unit/provider/user/windows_spec.rb
+++ b/spec/unit/provider/user/windows_spec.rb
@@ -51,7 +51,7 @@ describe Chef::Provider::User::Windows do
@provider = Chef::Provider::User::Windows.new(@new_resource, @run_context)
end
- describe "when comparing the user's current attributes to the desired attributes" do
+ describe "when comparing the user's current properties to the desired properties" do
before do
@new_resource.comment "Adam Jacob"
@new_resource.uid 1000
@@ -63,7 +63,7 @@ describe Chef::Provider::User::Windows do
@provider.current_resource = @new_resource.clone
end
- describe "and the attributes match" do
+ describe "and the properties match" do
it "doesn't set the comment field to be updated" do
expect(@provider.set_options).not_to have_key(:full_name)
end
@@ -90,7 +90,7 @@ describe Chef::Provider::User::Windows do
end
- describe "and the attributes do not match" do
+ describe "and the properties do not match" do
before do
@current_resource = Chef::Resource::User::WindowsUser.new("adam")
@current_resource.comment "Adam Jacob-foo"
@@ -106,23 +106,23 @@ describe Chef::Provider::User::Windows do
expect(@provider.set_options[:full_name]).to eq("Adam Jacob")
end
- it "marks the home_dir attribute to be updated" do
+ it "marks the home_dir property to be updated" do
expect(@provider.set_options[:home_dir]).to eq("/home/adam")
end
- it "ignores the primary_group_id attribute" do
+ it "ignores the primary_group_id property" do
expect(@provider.set_options[:primary_group_id]).to eq(nil)
end
- it "marks the user_id attribute to be updated" do
+ it "marks the user_id property to be updated" do
expect(@provider.set_options[:user_id]).to eq(1000)
end
- it "marks the script_path attribute to be updated" do
+ it "marks the script_path property to be updated" do
expect(@provider.set_options[:script_path]).to eq("/usr/bin/zsh")
end
- it "marks the password attribute to be updated" do
+ it "marks the password property to be updated" do
expect(@provider.set_options[:password]).to eq("abracadabra")
end
end
diff --git a/spec/unit/provider/user_spec.rb b/spec/unit/provider/user_spec.rb
index 9da933606e..7a07527834 100644
--- a/spec/unit/provider/user_spec.rb
+++ b/spec/unit/provider/user_spec.rb
@@ -200,18 +200,18 @@ describe Chef::Provider::User do
}
end
- %w{uid gid comment home shell password}.each do |attribute|
- it "should return true if #{attribute} doesn't match" do
- @new_resource.send(attribute, mapping[attribute][0])
- @current_resource.send(attribute, mapping[attribute][1])
+ %w{uid gid comment home shell password}.each do |property|
+ it "should return true if #{property} doesn't match" do
+ @new_resource.send(property, mapping[property][0])
+ @current_resource.send(property, mapping[property][1])
expect(@provider.compare_user).to eql(true)
end
end
- %w{uid gid}.each do |attribute|
- it "should return false if string #{attribute} matches fixnum" do
- @new_resource.send(attribute, "100")
- @current_resource.send(attribute, 100)
+ %w{uid gid}.each do |property|
+ it "should return false if string #{property} matches fixnum" do
+ @new_resource.send(property, "100")
+ @current_resource.send(property, 100)
expect(@provider.compare_user).to eql(false)
end
end
@@ -256,7 +256,7 @@ describe Chef::Provider::User do
expect(@new_resource).to be_updated
end
- it "should call manage_user if the user exists and has mismatched attributes" do
+ it "should call manage_user if the user exists and has mismatched properties" do
@provider.user_exists = true
allow(@provider).to receive(:compare_user).and_return(true)
expect(@provider).to receive(:manage_user).and_return(true)
@@ -315,7 +315,7 @@ describe Chef::Provider::User do
# @provider.stub(:manage_user).and_return(true)
end
- it "should run manage_user if the user exists and has mismatched attributes" do
+ it "should run manage_user if the user exists and has mismatched properties" do
expect(@provider).to receive(:compare_user).and_return(true)
expect(@provider).to receive(:manage_user).and_return(true)
@provider.action_manage
@@ -335,7 +335,7 @@ describe Chef::Provider::User do
@provider.action_manage
end
- it "should not run manage_user if the user exists but has no differing attributes" do
+ it "should not run manage_user if the user exists but has no differing properties" do
expect(@provider).to receive(:compare_user).and_return(false)
expect(@provider).not_to receive(:manage_user)
@provider.action_manage
@@ -358,7 +358,7 @@ describe Chef::Provider::User do
# @provider.stub(:manage_user).and_return(true)
end
- it "should run manage_user if the user exists and has mismatched attributes" do
+ it "should run manage_user if the user exists and has mismatched properties" do
expect(@provider).to receive(:compare_user).and_return(true)
expect(@provider).to receive(:manage_user).and_return(true)
@provider.action_modify
@@ -372,7 +372,7 @@ describe Chef::Provider::User do
expect(@new_resource).to be_updated
end
- it "should not run manage_user if the user exists but has no differing attributes" do
+ it "should not run manage_user if the user exists but has no differing properties" do
expect(@provider).to receive(:compare_user).and_return(false)
expect(@provider).not_to receive(:manage_user)
@provider.action_modify
diff --git a/spec/unit/resource/file_spec.rb b/spec/unit/resource/file_spec.rb
index 5e649da1a9..54dc8ab92b 100644
--- a/spec/unit/resource/file_spec.rb
+++ b/spec/unit/resource/file_spec.rb
@@ -118,7 +118,7 @@ describe Chef::Resource::File do
resource.rights :read, "Everyone"
resource.rights :full_control, "DOMAIN\User"
end
- it "describes its state including windows ACL attributes" do
+ it "describes its state including windows ACL properties" do
state = resource.state_for_resource_reporter
expect(state[:rights]).to eq([ { permissions: :read, principals: "Everyone" },
{ permissions: :full_control, principals: "DOMAIN\User" } ])
diff --git a/spec/unit/resource/mdadm_spec.rb b/spec/unit/resource/mdadm_spec.rb
index d2e3c37de8..62879859a2 100644
--- a/spec/unit/resource/mdadm_spec.rb
+++ b/spec/unit/resource/mdadm_spec.rb
@@ -41,42 +41,42 @@ describe Chef::Resource::Mdadm do
expect { resource.action :stop }.not_to raise_error
end
- it "allows you to set the raid_device attribute" do
+ it "allows you to set the raid_device property" do
resource.raid_device "/dev/md3"
expect(resource.raid_device).to eql("/dev/md3")
end
- it "allows you to set the chunk attribute" do
+ it "allows you to set the chunk property" do
resource.chunk 256
expect(resource.chunk).to eql(256)
end
- it "allows you to set the level attribute" do
+ it "allows you to set the level property" do
resource.level 1
expect(resource.level).to eql(1)
end
- it "allows you to set the metadata attribute" do
+ it "allows you to set the metadata property" do
resource.metadata "1.2"
expect(resource.metadata).to eql("1.2")
end
- it "allows you to set the bitmap attribute" do
+ it "allows you to set the bitmap property" do
resource.bitmap "internal"
expect(resource.bitmap).to eql("internal")
end
- it "allows you to set the layout attribute" do
+ it "allows you to set the layout property" do
resource.layout "f2"
expect(resource.layout).to eql("f2")
end
- it "allows you to set the devices attribute" do
+ it "allows you to set the devices property" do
resource.devices ["/dev/sda", "/dev/sdb"]
expect(resource.devices).to eql(["/dev/sda", "/dev/sdb"])
end
- it "allows you to set the exists attribute" do
+ it "allows you to set the exists property" do
resource.exists true
expect(resource.exists).to eql(true)
end
diff --git a/spec/unit/resource/osx_profile_spec.rb b/spec/unit/resource/osx_profile_spec.rb
index 3a0b144183..41a6071893 100644
--- a/spec/unit/resource/osx_profile_spec.rb
+++ b/spec/unit/resource/osx_profile_spec.rb
@@ -41,18 +41,18 @@ describe Chef::Resource::OsxProfile do
expect { resource.action :remove }.not_to raise_error
end
- it "allows you to set the profile attribute" do
+ it "allows you to set the profile property" do
resource.profile "com.testprofile.screensaver"
expect(resource.profile).to eql("com.testprofile.screensaver")
end
- it "allows you to set the profile attribute to a string" do
+ it "allows you to set the profile property to a string" do
resource.profile "com.testprofile.screensaver"
expect(resource.profile).to be_a(String)
expect(resource.profile).to eql("com.testprofile.screensaver")
end
- it "allows you to set the profile attribute to a hash" do
+ it "allows you to set the profile property to a hash" do
test_profile = { "profile" => false }
resource.profile test_profile
expect(resource.profile).to be_a(Hash)
diff --git a/spec/unit/resource/powershell_script_spec.rb b/spec/unit/resource/powershell_script_spec.rb
index 9afd202f91..c4f468e419 100644
--- a/spec/unit/resource/powershell_script_spec.rb
+++ b/spec/unit/resource/powershell_script_spec.rb
@@ -59,7 +59,7 @@ describe Chef::Resource::PowershellScript do
allow(resource).to receive(:updated).and_return(true)
end
- it "inherits exactly the :cwd, :environment, :group, :path, :user, :umask, :architecture, :elevated attributes from a parent resource class" do
+ it "inherits exactly the :cwd, :environment, :group, :path, :user, :umask, :architecture, :elevated properties from a parent resource class" do
inherited_difference = Chef::Resource::PowershellScript.guard_inherited_attributes -
[:cwd, :environment, :group, :path, :user, :umask, :architecture, :elevated ]
diff --git a/spec/unit/resource/scm_spec.rb b/spec/unit/resource/scm_spec.rb
index be529a3832..d27e46e937 100644
--- a/spec/unit/resource/scm_spec.rb
+++ b/spec/unit/resource/scm_spec.rb
@@ -78,12 +78,12 @@ describe Chef::Resource::Scm do
expect(resource.group).to eq(23)
end
- it "has a svn_username String attribute" do
+ it "has a svn_username String property" do
resource.svn_username "moartestsplz"
expect(resource.svn_username).to eql("moartestsplz")
end
- it "has a svn_password String attribute" do
+ it "has a svn_password String property" do
resource.svn_password "taftplz"
expect(resource.svn_password).to eql("taftplz")
end
@@ -141,14 +141,14 @@ describe Chef::Resource::Scm do
expect(resource.environment).to be_nil
end
- describe "when it has a timeout attribute" do
+ describe "when it has a timeout property" do
let(:ten_seconds) { 10 }
before { resource.timeout(ten_seconds) }
it "stores this timeout" do
expect(resource.timeout).to eq(ten_seconds)
end
end
- describe "when it has no timeout attribute" do
+ describe "when it has no timeout property" do
it "has no default timeout" do
expect(resource.timeout).to be_nil
end
@@ -173,7 +173,7 @@ describe Chef::Resource::Scm do
end
end
- describe "when it has a environment attribute" do
+ describe "when it has a environment property" do
let(:test_environment) { { "CHEF_ENV" => "/tmp" } }
before { resource.environment(test_environment) }
it "stores this environment" do
diff --git a/spec/unit/resource/subversion_spec.rb b/spec/unit/resource/subversion_spec.rb
index b29c880b91..a5faa775e1 100644
--- a/spec/unit/resource/subversion_spec.rb
+++ b/spec/unit/resource/subversion_spec.rb
@@ -71,13 +71,13 @@ describe Chef::Resource::Subversion do
expect(resource.svn_arguments).to be_nil
end
- it "has a svn_arguments String attribute" do
+ it "has a svn_arguments String property" do
expect(resource.svn_arguments).to eq("--no-auth-cache") # the default
resource.svn_arguments "--more-taft plz"
expect(resource.svn_arguments).to eql("--more-taft plz")
end
- it "has a svn_info_args String attribute" do
+ it "has a svn_info_args String property" do
expect(resource.svn_info_args).to eq("--no-auth-cache") # the default
resource.svn_info_args("--no-moar-plaintext-creds yep")
expect(resource.svn_info_args).to eq("--no-moar-plaintext-creds yep")
diff --git a/spec/unit/resource/template_spec.rb b/spec/unit/resource/template_spec.rb
index 56af50517c..9ca1f7617f 100644
--- a/spec/unit/resource/template_spec.rb
+++ b/spec/unit/resource/template_spec.rb
@@ -111,7 +111,7 @@ describe Chef::Resource::Template do
end
context "on windows", :windows_only do
- # according to Chef::Resource::File, windows state attributes are rights + deny_rights
+ # according to Chef::Resource::File, windows state properties are rights + deny_rights
skip "it describes its state"
end
diff --git a/spec/unit/resource/windows_package_spec.rb b/spec/unit/resource/windows_package_spec.rb
index 5a2cfcf99f..7a513b020a 100644
--- a/spec/unit/resource/windows_package_spec.rb
+++ b/spec/unit/resource/windows_package_spec.rb
@@ -89,7 +89,7 @@ describe Chef::Resource::WindowsPackage, "initialize" do
expect(resource.source).to include("solitaire.msi")
end
- it "supports the checksum attribute" do
+ it "supports the checksum property" do
resource.checksum("somechecksum")
expect(resource.checksum).to eq("somechecksum")
end
diff --git a/spec/unit/resource/windows_service_spec.rb b/spec/unit/resource/windows_service_spec.rb
index 29f5821a15..8648b52a17 100644
--- a/spec/unit/resource/windows_service_spec.rb
+++ b/spec/unit/resource/windows_service_spec.rb
@@ -66,7 +66,7 @@ describe Chef::Resource::WindowsService, "initialize" do
expect(resource.action).to eq([:configure_startup])
end
- # Attributes that are Strings
+ # Properties that are Strings
%i{description service_name binary_path_name load_order_group dependencies
run_as_user run_as_password display_name}.each do |prop|
it "support setting #{prop}" do
@@ -75,7 +75,7 @@ describe Chef::Resource::WindowsService, "initialize" do
end
end
- # Attributes that are Integers
+ # Properties that are Integers
%i{desired_access error_control service_type}.each do |prop|
it "support setting #{prop}" do
resource.send("#{prop}=", 1)
@@ -83,7 +83,7 @@ describe Chef::Resource::WindowsService, "initialize" do
end
end
- # Attributes that are Booleans
+ # Properties that are Booleans
%i{delayed_start}.each do |prop|
it "support setting #{prop}" do
resource.send("#{prop}=", true)
diff --git a/spec/unit/resource/yum_package_spec.rb b/spec/unit/resource/yum_package_spec.rb
index d1dc1a3cce..0b79a447a3 100644
--- a/spec/unit/resource/yum_package_spec.rb
+++ b/spec/unit/resource/yum_package_spec.rb
@@ -41,8 +41,8 @@ describe Chef::Resource::YumPackage do
# the new_resource.package_named/version/arch properties. until that is fixed properly
# we need to coerce and dup those properties into normal arrays. this does not affect
# strings because those are not mutated in place and they are not (currently) frozen
- # in immutable attributes (even though they really, really should be).
- context "when passed immutable node attribute arrays" do
+ # in immutable properties (even though they really, really should be).
+ context "when passed immutable node property arrays" do
let(:node) { Chef::Node.new }
before do
diff --git a/spec/unit/resource_reporter_spec.rb b/spec/unit/resource_reporter_spec.rb
index fe8b129a73..c532ba0ae9 100644
--- a/spec/unit/resource_reporter_spec.rb
+++ b/spec/unit/resource_reporter_spec.rb
@@ -410,7 +410,7 @@ describe Chef::ResourceReporter do
expect(@first_update_report["name"]).to eq(new_resource.name)
end
- it "includes the resource's id attribute" do
+ it "includes the resource's id property" do
expect(@first_update_report["id"]).to eq(new_resource.identity)
end
@@ -551,7 +551,7 @@ describe Chef::ResourceReporter do
expect(@first_update_report["name"]).to eq(@new_resource.name)
end
- it "includes the resource's id attribute" do
+ it "includes the resource's id property" do
expect(@first_update_report["id"]).to eq(@new_resource.identity)
end