Skip to content

Commit

Permalink
Fixed Dir#close specs on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
andrykonchin committed Jan 6, 2025
1 parent 0b7d38e commit 18032a7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/dir/close_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@

it "does not raise an IOError even if the Dir instance is closed" do
dir = Dir.open DirSpecs.mock_dir
dir.close
dir.close
dir.close.should == nil
dir.close.should == nil

-> { dir.fileno }.should raise_error(IOError, /closed directory/)
guard -> { dir.respond_to? :fileno } do
-> { dir.fileno }.should raise_error(IOError, /closed directory/)
end
end

it "returns nil" do
Expand Down

0 comments on commit 18032a7

Please sign in to comment.