From ac84a8ab0a2a0cdff87f68bff3ef9742904dc5b1 Mon Sep 17 00:00:00 2001 From: Corey Johnson & Nathan Sobo Date: Wed, 28 Nov 2012 17:13:32 -0700 Subject: [PATCH] Destroy buffer to avoid leaking a path watch --- spec/app/buffer-spec.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec/app/buffer-spec.coffee b/spec/app/buffer-spec.coffee index 6ae3659e0..e485c0cdb 100644 --- a/spec/app/buffer-spec.coffee +++ b/spec/app/buffer-spec.coffee @@ -143,6 +143,10 @@ describe 'Buffer', -> waitsFor "file to be removed", (done) -> bufferToDelete.file.one 'remove', done + + afterEach -> + bufferToDelete.destroy() + it "retains its path and reports the buffer as modified", -> expect(bufferToDelete.getPath()).toBe path expect(bufferToDelete.isModified()).toBeTruthy()