             atom.rootView.open('b').then (o) -> editor = o
 
           runs ->
-            expect(rootView.getActivePane().activeItem).toBe editor
+            expect(atom.rootView.getActivePane().activeItem).toBe editor
             expect(editor.getPath()).toBe require.resolve('./fixtures/dir/b')
-            expect(rootView.getActivePane().focus).toHaveBeenCalled()
+            expect(atom.rootView.getActivePane().focus).toHaveBeenCalled()
 
     describe "when there is an active pane", ->
       [activePane] = []

        expect(editor3.isFocused).toBeFalsy()
        expect(editor4.isFocused).toBeFalsy()

        expect(rootView.title).toBe "#{path.basename(editor2.getPath())} - #{project.getPath()}"

    describe "where there are no open editors", ->
      it "constructs the view with no open editors", ->
        atom.rootView.getActivePane().remove()
        expect(rootView.getEditors().length).toBe 0
        refreshRootViewAndProject()
        expect(rootView.getEditors().length).toBe 0

  describe "focus", ->
    beforeEach ->

    refreshRootViewAndProject = ->
      project2 = atom.replicate().get('project')
      atom.project = project2
      rootViewState = atom.rootView.serialize()
      atom.project.getState().serializeForPersistence()
      atom.rootView.remove()
      atom.project.destroy()
