summaryrefslogtreecommitdiff
path: root/spec/ruby/core/dir/shared/closed.rb
blob: 17d8332c2a6f9cb6b905a0a106fcd6355e019720 (plain)
1
2
3
4
5
6
7
8
9
describe :dir_closed, shared: true do
  it "raises an IOError when called on a closed Dir instance" do
    -> {
      dir = Dir.open DirSpecs.mock_dir
      dir.close
      dir.send(@method) {}
    }.should raise_error(IOError)
  end
end