Destroy buffer to avoid leaking a path watch

This commit is contained in:
Corey Johnson & Nathan Sobo 2012-11-28 17:13:32 -07:00
parent ce82439420
commit ac84a8ab0a

View File

@ -143,6 +143,10 @@ describe 'Buffer', ->
waitsFor "file to be removed", (done) -> waitsFor "file to be removed", (done) ->
bufferToDelete.file.one 'remove', done bufferToDelete.file.one 'remove', done
afterEach ->
bufferToDelete.destroy()
it "retains its path and reports the buffer as modified", -> it "retains its path and reports the buffer as modified", ->
expect(bufferToDelete.getPath()).toBe path expect(bufferToDelete.getPath()).toBe path
expect(bufferToDelete.isModified()).toBeTruthy() expect(bufferToDelete.isModified()).toBeTruthy()