Sha256: 8d607a92886c54867fefa40171259f93d7c314c18e56c2451c8bbb0e39847834
Contents?: true
Size: 783 Bytes
Versions: 59
Compression:
Stored size: 783 Bytes
Contents
describe :dir_delete, :shared => true do before :all do DirSpecs.rmdir_dirs end after :all do DirSpecs.rmdir_dirs false end it "removes empty directories" do Dir.send(@method, DirSpecs.mock_rmdir("empty")).should == 0 end it "raises a SystemCallError when trying to remove a nonempty directory" do lambda do Dir.send @method, DirSpecs.mock_rmdir("nonempty") end.should raise_error(SystemCallError) end unless System.get_property('platform') == 'WINDOWS' it "raises a SystemCallError if lacking adequate permissions to remove the directory" do File.chmod(0000, DirSpecs.mock_rmdir("noperm")) lambda do Dir.send @method, DirSpecs.mock_rmdir("noperm", "child") end.should raise_error(SystemCallError) end end end
Version data entries
59 entries across 59 versions & 1 rubygems