diff options
author | sersut <serdar@opscode.com> | 2013-11-19 13:53:27 -0800 |
---|---|---|
committer | sersut <serdar@opscode.com> | 2013-11-19 15:06:10 -0800 |
commit | c57230b63579a87cf950efa54ed508247ec32c7a (patch) | |
tree | 02fbc9ee9da1ad2bdc2d9ba5109f09de78457a1a /spec/unit/provider/group | |
parent | 73af53f1afffca88e99a8a31a286cf2c4a000dab (diff) | |
download | chef-c57230b63579a87cf950efa54ed508247ec32c7a.tar.gz |
Fix the failing pw provider unit spec.
Diffstat (limited to 'spec/unit/provider/group')
-rw-r--r-- | spec/unit/provider/group/pw_spec.rb | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/spec/unit/provider/group/pw_spec.rb b/spec/unit/provider/group/pw_spec.rb index 951dbb362e..a545f8ee70 100644 --- a/spec/unit/provider/group/pw_spec.rb +++ b/spec/unit/provider/group/pw_spec.rb @@ -59,7 +59,8 @@ describe Chef::Provider::Group::Pw do it "should run pw groupmod with the return of set_options" do @new_resource.gid(42) @new_resource.members(["someone"]) - @provider.should_receive(:run_command).with({ :command => "pw groupmod wheel -g '42' -M someone -d root,aj" }).and_return(true) + @provider.should_receive(:run_command).with({ :command => "pw groupmod wheel -g '42' -m someone" }).and_return(true) + @provider.should_receive(:run_command).with({ :command => "pw groupmod wheel -g '42' -d root,aj" }).and_return(true) @provider.manage_group end @@ -81,7 +82,7 @@ describe Chef::Provider::Group::Pw do end it "should set no options" do - @provider.set_members_option.should eql("") + @provider.set_members_options.should eql([ ]) end end @@ -93,11 +94,11 @@ describe Chef::Provider::Group::Pw do it "should log an appropriate message" do Chef::Log.should_receive(:debug).with("group[wheel] removing group members: all,your,base") - @provider.set_members_option + @provider.set_members_options end it "should set the -d option with the members joined by ','" do - @provider.set_members_option.should eql(" -d all,your,base") + @provider.set_members_options.should eql([ " -d all,your,base" ]) end end @@ -109,11 +110,11 @@ describe Chef::Provider::Group::Pw do it "should log an appropriate debug message" do Chef::Log.should_receive(:debug).with("group[wheel] adding group members: all,your,base") - @provider.set_members_option + @provider.set_members_options end it "should set the -M option with the members joined by ','" do - @provider.set_members_option.should eql(" -M all,your,base") + @provider.set_members_options.should eql([ " -m all,your,base" ]) end end end |