         describe "when the disk contents were changed since serialization", ->
           it "loads the disk contents instead of the previous unsaved state", ->
             buffer.setText("BUFFER CHANGE")
-            fs.writeFileSync(filePath, "DISK CHANGE")
+            writeFileSync(filePath, "DISK CHANGE")
 
             buffer2 = buffer.testSerialization()
 

        modifiedHandler.reset()
        buffer.save()

        expect(fs.existsSync(filePath)).toBeTruthy()
        expect(modifiedHandler).toHaveBeenCalledWith(false)
        expect(buffer.isModified()).toBe false


        buffer.file.on 'contents-changed', fileChangeHandler

        buffer.insert([0, 0], "a change")
        writeFileSync(filePath, "second")

        expect(fileChangeHandler.callCount).toBe 0
        waitsFor "file to trigger 'contents-changed' event", ->
