         editorView.getFirstVisibleScreenRow = -> 0
         editorView.getLastVisibleScreenRow = -> 999
 
-        editor = editorView.getEditor()
+        editor = editorView.getModel()
         state =
           isRebase: true
 

      atom.on 'merge-conflicts:resolved', (e) -> event = e
      m.conflicts[2].theirs.resolve()

      expect(event.file).toBe(editorView.getEditor().getPath())
      expect(event.total).toBe(3)
      expect(event.resolved).toBe(1)
      expect(event.source).toBe(m)

    it 'tracks the active conflict side', ->
      editorView.getEditor().setCursorBufferPosition [11, 0]
      expect(m.active()).toEqual([])
      editorView.getEditor().setCursorBufferPosition [14, 5]
      expect(m.active()).toEqual([m.conflicts[1].ours])

    describe 'with an active merge conflict', ->

        detectDirty()
        expect(active.ours.isDirty).toBe(true)

        atom.commands.dispatch editorView, 'merge-conflicts:revert-current'
        detectDirty()
        expect(active.ours.isDirty).toBe(false)

      it 'accepts ours-then-theirs on merge-conflicts:ours-then-theirs', ->
        atom.commands.dispatch editorView, 'merge-conflicts:ours-then-theirs'
        expect(active.resolution).toBe(active.ours)
        t = editor.getTextInBufferRange active.resolution.marker.getBufferRange()
        expect(t).toBe("My middle changes\nYour middle changes\n")

      it 'accepts theirs-then-ours on merge-conflicts:theirs-then-ours', ->
        atom.commands.dispatch editorView, 'merge-conflicts:theirs-then-ours'
        expect(active.resolution).toBe(active.theirs)
        t = editor.getTextInBufferRange active.resolution.marker.getBufferRange()
        expect(t).toBe("Your middle changes\nMy middle changes\n")
