     it "doesn't update the buffer modified indicator for the old buffer", ->
       oldBuffer = editor.getBuffer()
       expect(statusBar.bufferModified.text()).toBe ''
-      rootView.open('sample.txt')
+      rootView.openSync('sample.txt')
       oldBuffer.setText("new text")
       advanceClock(buffer.stoppedChangingDelay)
       expect(statusBar.bufferModified.text()).toBe ''

      it "displays 'untitled' instead of the buffer's path, but still displays the buffer position", ->
        rootView.remove()
        window.rootView = new RootView
        rootView.open()
        rootView.simulateDomAttachment()
        StatusBar.activate()
        statusBar = rootView.find('.status-bar').view()


    it "displays the current branch for files in repositories", ->
      project.setPath(project.resolve('git/master.git'))
      rootView.openSync('HEAD')
      expect(statusBar.branchArea).toBeVisible()
      expect(statusBar.branchLabel.text()).toBe 'master'

    it "doesn't display the current branch for a file not in a repository", ->
      project.setPath('/tmp')
      rootView.openSync('/tmp/temp.txt')
      expect(statusBar.branchArea).toBeHidden()

    it "doesn't display the current branch for a file outside the current project", ->
      rootView.openSync('/tmp/atom-specs/not-in-project.txt')
      expect(statusBar.branchArea).toBeHidden()

  describe "git status label", ->
