summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authordanielsdeleo <dan@opscode.com>2013-10-31 17:05:42 -0700
committerdanielsdeleo <dan@opscode.com>2013-11-01 15:27:32 -0700
commitc34885b8247a5ff1d2a2ec2b63f41a6f7b0d0b52 (patch)
tree9ea31d17fbe493833221863b97519ba5100e04c3 /spec
parent1a1c40b10f4aa68ca218c7e3d3d94ef561b0d996 (diff)
downloadmixlib-shellout-c34885b8247a5ff1d2a2ec2b63f41a6f7b0d0b52.tar.gz
Update mock/stubs to avoid deprecations
Diffstat (limited to 'spec')
-rw-r--r--spec/mixlib/shellout_spec.rb4
1 files changed, 2 insertions, 2 deletions
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 ])