Editor.save spec removes test files in afterEach method

This commit is contained in:
Corey Johnson
2012-03-14 14:38:03 -07:00
parent a09c76e3b5
commit 154fa2fa92

View File

@@ -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()