From c34885b8247a5ff1d2a2ec2b63f41a6f7b0d0b52 Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Thu, 31 Oct 2013 17:05:42 -0700 Subject: Update mock/stubs to avoid deprecations --- spec/mixlib/shellout_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'spec') diff --git a/spec/mixlib/shellout_spec.rb b/spec/mixlib/shellout_spec.rb index 084e1b2..9814473 100644 --- a/spec/mixlib/shellout_spec.rb +++ b/spec/mixlib/shellout_spec.rb @@ -1064,8 +1064,8 @@ describe Mixlib::ShellOut do # test for for_fd returning a valid File object, but close # throwing EBADF. it "should not throw an exception if fd.close throws EBADF" do - fd = mock('File') - fd.stub!(:close).at_least(:once).and_raise(Errno::EBADF) + fd = double('File') + fd.stub(:close).at_least(:once).and_raise(Errno::EBADF) File.should_receive(:for_fd).at_least(:once).and_return(fd) shellout = Mixlib::ShellOut.new() shellout.instance_variable_set(:@process_status_pipe, [ 98, 99 ]) -- cgit v1.2.1