summaryrefslogtreecommitdiff
path: root/spec/unit/provider/group
diff options
context:
space:
mode:
authorkaustubh-d <kaustubh@clogeny.com>2014-11-18 14:56:22 +0530
committerBryan McLellan <btm@opscode.com>2015-02-17 09:16:38 -0500
commit6909f4074dbd9cee5906333f693bd282476a6ac5 (patch)
tree7deb7fcea3b0409b23986f317649f8ec18fa241e /spec/unit/provider/group
parentaa9b233614da81c506929cc1c36eb509a4e2c97e (diff)
downloadchef-6909f4074dbd9cee5906333f693bd282476a6ac5.tar.gz
fix aix related providers to replace popen4 with mixlib shell_out
Diffstat (limited to 'spec/unit/provider/group')
-rw-r--r--spec/unit/provider/group/dscl_spec.rb13
1 files changed, 5 insertions, 8 deletions
diff --git a/spec/unit/provider/group/dscl_spec.rb b/spec/unit/provider/group/dscl_spec.rb
index e09365a828..d84e4e1d57 100644
--- a/spec/unit/provider/group/dscl_spec.rb
+++ b/spec/unit/provider/group/dscl_spec.rb
@@ -27,16 +27,13 @@ describe Chef::Provider::Group::Dscl do
@current_resource = Chef::Resource::Group.new("aj")
@provider = Chef::Provider::Group::Dscl.new(@new_resource, @run_context)
@provider.current_resource = @current_resource
- @status = double("Process::Status", :exitstatus => 0)
- @pid = 2342
- @stdin = StringIO.new
- @stdout = StringIO.new("\n")
- @stderr = StringIO.new("")
- allow(@provider).to receive(:popen4).and_yield(@pid,@stdin,@stdout,@stderr).and_return(@status)
+
+ @status = double(:stdout => "\n", :stderr => "", :exitstatus => 0)
+ allow(@provider).to receive(:shell_out).and_return(@status)
end
- it "should run popen4 with the supplied array of arguments appended to the dscl command" do
- expect(@provider).to receive(:popen4).with("dscl . -cmd /Path arg1 arg2")
+ it "should run shell_out with the supplied array of arguments appended to the dscl command" do
+ expect(@provider).to receive(:shell_out).with("dscl . -cmd /Path arg1 arg2")
@provider.dscl("cmd", "/Path", "arg1", "arg2")
end