diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-12-20 16:15:07 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-12-20 16:15:07 -0800 |
commit | 1c9b81cab7461b1fc687e327a90eed1f3b446989 (patch) | |
tree | 065a08fa13ad1b078435db7569c2f2893626a532 | |
parent | 0d1c3fcd9b866f241464219c99c2274fd5a8ca9b (diff) | |
download | chef-1c9b81cab7461b1fc687e327a90eed1f3b446989.tar.gz |
fix unnecessary quoting of argslcg/deprecate-run-command
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r-- | lib/chef/provider/group/groupadd.rb | 2 | ||||
-rw-r--r-- | spec/unit/provider/group/groupadd_spec.rb | 4 |
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) |