Permalink
Browse files

Revert IO#dup spec to unmask errors, removed FileUtils dependency.

* Any errors occurring in specs should generally be raised normally
  so that any potential problem or spec deficiency is exposed.
  • Loading branch information...
1 parent 04f542e commit 0964d53edd80367611f63cd6eb4b294ec898cc8d @rue rue committed Jan 14, 2008
Showing with 3 additions and 6 deletions.
  1. +3 −6 spec/ruby/1.8/core/io/dup_spec.rb
@@ -1,8 +1,6 @@
require File.dirname(__FILE__) + '/../../spec_helper'
# Do not change anything above this line
-require 'fileutils'
-
describe "IO#dup" do
before :all do
@@ -18,12 +16,12 @@
end
after :each do
- @i.close rescue nil
- @f.close rescue nil
+ @i.close unless @i.closed?
+ @f.close unless @f.closed?
end
after :all do
- FileUtils.rm @file
+ File.unlink @file
end
it "returns a new IO instance" do
@@ -62,7 +60,6 @@
@f.closed?.should == false
end
-
it "allows closing the original IO without affecting the new one" do
@f.close
lambda { @i.gets }.should_not raise_error(Exception)

0 comments on commit 0964d53

Please sign in to comment.