     [filePath, bufferToChange, eventHandler] = []
 
     beforeEach (done) ->
-      filePath = join(__dirname, "fixtures", "manipulate-me")
+      tempDir = temp.mkdirSync('text-buffer')
+      filePath = join(tempDir , "manipulate-me")
       fs.writeFileSync(filePath, "")
       bufferToChange = new TextBuffer({filePath, load: false})
       eventHandler = jasmine.createSpy('eventHandler')

      , 30)

    describe "when the buffer is in an unmodified state before the file is modified on disk", ->
      [changeHandler] = []
      beforeEach (done) ->
        calls = 0
        changeHandler = jasmine.createSpy('changeHandler').and.callFake ->
          calls = calls + 1
          done() if calls >= 2
        buffer.onDidChange changeHandler
        fs.writeFileSync(filePath, "second")
        expect(changeHandler.calls.count()).toBe 0

      it "changes the in-memory contents of the buffer to match the new disk contents and notifies ::onDidChange observers", ->
        [event] = changeHandler.calls.allArgs()[0]
        expect(event.oldRange).toEqual [[0, 0], [0, 0]]
        expect(event.newRange).toEqual [[0, 0], [0, 6]]
        expect(event.oldText).toBe ""
        expect(event.newText).toBe "second"

        [event] = changeHandler.calls.allArgs()[1]
        expect(event.oldRange).toEqual [[0, 6], [0, 11]]
        expect(event.newRange).toEqual [[0, 6], [0, 6]]
        expect(event.oldText).toBe "first"
        expect(event.newText).toBe ""

        expect(buffer.isModified()).toBeFalsy()


        done()

    afterEach ->
      buffer?.destroy()

    it "does not notify ::onDidChange observers when the file is written via TextBuffer::save", (done) ->
      buffer.insert([0,0], "HELLO!")
