summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/chef/provider/group/groupadd.rb2
-rw-r--r--spec/unit/provider/group/groupadd_spec.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/provider/group/groupadd.rb b/lib/chef/provider/group/groupadd.rb
index 53eb3ec626..e94ed93cbd 100644
--- a/lib/chef/provider/group/groupadd.rb
+++ b/lib/chef/provider/group/groupadd.rb
@@ -112,7 +112,7 @@ class Chef
if current_resource.send(field) != new_resource.send(field)
if new_resource.send(field)
opts << option
- opts << "'#{new_resource.send(field)}'"
+ opts << new_resource.send(field)
Chef::Log.debug("#{new_resource} set #{field} to #{new_resource.send(field)}")
end
end
diff --git a/spec/unit/provider/group/groupadd_spec.rb b/spec/unit/provider/group/groupadd_spec.rb
index 2afb35a03f..70a98ff2f5 100644
--- a/spec/unit/provider/group/groupadd_spec.rb
+++ b/spec/unit/provider/group/groupadd_spec.rb
@@ -58,7 +58,7 @@ describe Chef::Provider::Group::Groupadd do
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])
+ expect(provider.set_options).to eql([ option, new_resource.send(attribute), new_resource.group_name])
end
end
@@ -67,7 +67,7 @@ describe Chef::Provider::Group::Groupadd do
field_list.sort { |a, b| a[0] <=> b[0] }.each do |attribute, option|
allow(new_resource).to receive(attribute).and_return("hola")
match_array << option
- match_array << "'hola'"
+ match_array << "hola"
end
match_array << "aj"
expect(provider.set_options).to eql(match_array)