From 154fa2fa92eb399d08d97873ad181bf73bfe184d Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Wed, 14 Mar 2012 14:38:03 -0700 Subject: [PATCH] Editor.save spec removes test files in afterEach method --- spec/atom/editor-spec.coffee | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spec/atom/editor-spec.coffee b/spec/atom/editor-spec.coffee index bf3132292..7facbc374 100644 --- a/spec/atom/editor-spec.coffee +++ b/spec/atom/editor-spec.coffee @@ -1060,11 +1060,13 @@ describe "Editor", -> tempFilePath = null beforeEach -> - tempFilePath = '/tmp/temp.txt' - expect(fs.remove(tempFilePath)) + tempFilePath = '/tmp/atom-temp.txt' editor.setBuffer new Buffer(tempFilePath) expect(editor.buffer.path).toBe tempFilePath + afterEach -> + expect(fs.remove(tempFilePath)) + it "saves the current buffer to disk", -> editor.buffer.setText 'Edited!' expect(fs.exists(tempFilePath)).toBeFalsy()