summaryrefslogtreecommitdiff
path: root/spec/unit/provider/ifconfig
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/ifconfig
parentaa9b233614da81c506929cc1c36eb509a4e2c97e (diff)
downloadchef-6909f4074dbd9cee5906333f693bd282476a6ac5.tar.gz
fix aix related providers to replace popen4 with mixlib shell_out
Diffstat (limited to 'spec/unit/provider/ifconfig')
-rw-r--r--spec/unit/provider/ifconfig/aix_spec.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/unit/provider/ifconfig/aix_spec.rb b/spec/unit/provider/ifconfig/aix_spec.rb
index 6e685823ac..0b6fa33614 100644
--- a/spec/unit/provider/ifconfig/aix_spec.rb
+++ b/spec/unit/provider/ifconfig/aix_spec.rb
@@ -49,10 +49,11 @@ IFCONFIG
describe "#load_current_resource" do
before do
- status = double("Status", :exitstatus => 0)
- expect(@provider).to receive(:popen4).with("ifconfig -a").and_yield(@pid,@stdin,StringIO.new(@ifconfig_output),@stderr).and_return(status)
+ @status = double(:stdout => @ifconfig_output, :exitstatus => 0)
+ allow(@provider).to receive(:shell_out).and_return(@status)
@new_resource.device "en0"
end
+
it "should load given interface with attributes." do
current_resource = @provider.load_current_resource
expect(current_resource.inet_addr).to eq("172.29.174.58")