       expect(StatusBar.git.gitStatusIcon).toHaveClass('icon-diff-ignored')
 
     it "updates when a status-changed event occurs", ->
-      fs.writeSync(filePath, "i've changed for the worse")
+      fs.writeFileSync(filePath, "i've changed for the worse")
       atom.project.getRepo().getPathStatus(filePath)
       atom.rootView.openSync(filePath)
       expect(StatusBar.git.gitStatusIcon).toHaveClass('icon-diff-modified')
-      fs.writeSync(filePath, originalPathText)
+      fs.writeFileSync(filePath, originalPathText)
       atom.project.getRepo().getPathStatus(filePath)
       expect(StatusBar.git.gitStatusIcon).not.toHaveClass('icon-diff-modified')
 
     it "displays the diff stat for modified files", ->
-      fs.writeSync(filePath, "i've changed for the worse")
+      fs.writeFileSync(filePath, "i've changed for the worse")
       atom.project.getRepo().getPathStatus(filePath)
       atom.rootView.openSync(filePath)
       expect(StatusBar.git.gitStatusIcon).toHaveText('+1')


  describe "git branch label", ->
    beforeEach ->
      fs.remove(path.join(os.tmpdir(), '.git')) if fs.isDirectorySync(path.join(os.tmpdir(), '.git'))
      atom.rootView.attachToDom()

    it "displays the current branch for files in repositories", ->

  describe "when the buffer content has changed from the content on disk", ->
    it "disables the buffer modified indicator on save", ->
      filePath = path.join(os.tmpdir(), "atom-whitespace.txt")
      fs.writeFileSync(filePath, "")
      atom.rootView.openSync(filePath)
      editor = atom.rootView.getActiveView()
      expect(StatusBar.fileInfo.bufferModified.text()).toBe ''
