 
   describe "when the buffer content has changed from the content on disk", ->
     it "disables the buffer modified indicator on save", ->
-      path = "/tmp/atom-whitespace.txt"
-      fsUtils.write(path, "")
-      rootView.open(path)
+      filePath = "/tmp/atom-whitespace.txt"
+      fsUtils.write(filePath, "")
+      rootView.open(filePath)
       expect(statusBar.bufferModified.text()).toBe ''
       editor.insertText("\n")
       advanceClock(buffer.stoppedChangingDelay)

RootView = require 'root-view'
StatusBar = require 'status-bar/lib/status-bar-view'
fsUtils = require 'fs-utils'
{$$} = require 'space-pen'

describe "StatusBar", ->

      expect(statusBar.branchLabel.text()).toBe ''

  describe "git status label", ->
    [repo, filePath, originalPathText, newPath, ignoredPath] = []

    beforeEach ->
      filePath = require.resolve('fixtures/git/working-dir/file.txt')
      newPath = path.join(fsUtils.resolveOnLoadPath('fixtures/git/working-dir'), 'new.txt')
      fsUtils.write(newPath, "I'm new here")
      ignoredPath = path.join(fsUtils.resolveOnLoadPath('fixtures/git/working-dir'), 'ignored.txt')
      fsUtils.write(ignoredPath, 'ignored.txt')
      git.getPathStatus(filePath)
      git.getPathStatus(newPath)
      originalPathText = fsUtils.read(filePath)
      rootView.attachToDom()

    afterEach ->
      fsUtils.write(filePath, originalPathText)
      fsUtils.remove(newPath) if fsUtils.exists(newPath)
      fsUtils.remove(ignoredPath) if fsUtils.exists(ignoredPath)

    it "displays the modified icon for a changed file", ->
      fsUtils.write(filePath, "i've changed for the worse")
      git.getPathStatus(filePath)
      rootView.open(filePath)
      expect(statusBar.gitStatusIcon).toHaveClass('modified-status-icon')

    it "doesn't display the modified icon for an unchanged file", ->
      rootView.open(filePath)
      expect(statusBar.gitStatusIcon).toHaveText('')

    it "displays the new icon for a new file", ->
