       itemHeight = list.find('li').outerHeight()
       list.height(itemHeight * 2)
 
-      miniEditor.trigger 'core:move-down'
-      miniEditor.trigger 'core:move-down'
+      editorView.trigger 'core:move-down'
+      editorView.trigger 'core:move-down'
       expect(list.scrollBottom()).toBe itemHeight * 3
 
-      miniEditor.trigger 'core:move-down'
+      editorView.trigger 'core:move-down'
       expect(list.scrollBottom()).toBe itemHeight * 4
 
-      miniEditor.trigger 'core:move-up'
-      miniEditor.trigger 'core:move-up'
+      editorView.trigger 'core:move-up'
+      editorView.trigger 'core:move-up'
       expect(list.scrollTop()).toBe itemHeight
 
   describe "the core:confirm event", ->
     describe "when there is an item selected (because the list in not empty)", ->
       it "triggers the selected hook with the selected array element", ->
-        miniEditor.trigger 'core:move-down'
-        miniEditor.trigger 'core:move-down'
-        miniEditor.trigger 'core:confirm'
-        expect(selectList.confirmed).toHaveBeenCalledWith(array[2])
+        editorView.trigger 'core:move-down'
+        editorView.trigger 'core:move-down'
+        editorView.trigger 'core:confirm'
+        expect(selectList.confirmed).toHaveBeenCalledWith(items[2])
 
     describe "when there is no item selected (because the list is empty)", ->
       beforeEach ->
         selectList.attachToDom()
 
       it "does not trigger the confirmed hook", ->
-        miniEditor.getEditor().insertText("i will never match anything")
+        editorView.getEditor().insertText("i will never match anything")
         window.advanceClock(selectList.inputThrottle)
 
         expect(list.find('li')).not.toExist()
-        miniEditor.trigger 'core:confirm'
+        editorView.trigger 'core:confirm'
         expect(selectList.confirmed).not.toHaveBeenCalled()
 
       it "does trigger the cancelled hook", ->
-        miniEditor.getEditor().insertText("i will never match anything")
+        editorView.getEditor().insertText("i will never match anything")
         window.advanceClock(selectList.inputThrottle)
 
         expect(list.find('li')).not.toExist()
-        miniEditor.trigger 'core:confirm'
+        editorView.trigger 'core:confirm'
         expect(selectList.cancelled).toHaveBeenCalled()
 
   describe "when a list item is clicked", ->

      selectList.attachToDom()

    it "filters the elements in the list based on the scoreElement function and selects the first item", ->
      miniEditor.getEditor().insertText('la')
      window.advanceClock(selectList.inputThrottle)

      expect(list.find('li').length).toBe 2

      expect(selectList.error).not.toBeVisible()

    it "displays an error if there are no matches, removes error when there are matches", ->
      editorView.getEditor().insertText('nothing will match this')
      window.advanceClock(selectList.inputThrottle)

      expect(list.find('li').length).toBe 0
      expect(selectList.error).not.toBeHidden()

      editorView.getEditor().setText('la')
      window.advanceClock(selectList.inputThrottle)

      expect(list.find('li').length).toBe 2
      expect(selectList.error).not.toBeVisible()

    it "displays no elements until the array has been set on the list", ->
      selectList.items = null
      selectList.list.empty()
      editorView.getEditor().insertText('la')
      window.advanceClock(selectList.inputThrottle)

      expect(list.find('li').length).toBe 0
      expect(selectList.error).toBeHidden()
      selectList.setItems(items)
      expect(list.find('li').length).toBe 2

  describe "when core:move-up / core:move-down are triggered on the editorView", ->
    it "selects the previous / next item in the list, or wraps around to the other side", ->
      expect(list.find('li:first')).toHaveClass 'selected'

      editorView.trigger 'core:move-up'

      expect(list.find('li:first')).not.toHaveClass 'selected'
      expect(list.find('li:last')).toHaveClass 'selected'

      editorView.trigger 'core:move-down'

      expect(list.find('li:first')).toHaveClass 'selected'
      expect(list.find('li:last')).not.toHaveClass 'selected'

      editorView.trigger 'core:move-down'

      expect(list.find('li:eq(0)')).not.toHaveClass 'selected'
      expect(list.find('li:eq(1)')).toHaveClass 'selected'

      editorView.trigger 'core:move-down'

      expect(list.find('li:eq(1)')).not.toHaveClass 'selected'
      expect(list.find('li:eq(2)')).toHaveClass 'selected'

      editorView.trigger 'core:move-up'

      expect(list.find('li:eq(2)')).not.toHaveClass 'selected'
      expect(list.find('li:eq(1)')).toHaveClass 'selected'
