 
   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)

      expect(statusBar.gitStatusIcon).toHaveClass('ignored-status-icon')

    it "updates when a status-changed event occurs", ->
      fsUtils.write(path, "i've changed for the worse")
      git.getPathStatus(path)
      rootView.open(path)
      expect(statusBar.gitStatusIcon).toHaveClass('modified-status-icon')
      fsUtils.write(path, originalPathText)
      git.getPathStatus(path)
      expect(statusBar.gitStatusIcon).not.toHaveClass('modified-status-icon')

    it "displays the diff stat for modified files", ->
      fsUtils.write(path, "i've changed for the worse")
      git.getPathStatus(path)
      rootView.open(path)
      expect(statusBar.gitStatusIcon).toHaveText('+1,-1')

    it "displays the diff stat for new files", ->

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

describe "StatusBar", ->
