           editor = atom.workspace.getActiveEditor()
           editor.setCursorBufferPosition([8,14])
           spyOn(SymbolsView.prototype, "moveToPosition").andCallThrough()
-          atom.workspaceView.getActiveView().trigger 'symbols-view:go-to-declaration'
+          atom.commands.dispatch(atom.views.getView(atom.workspace), 'symbols-view:go-to-declaration')
 
         waitsFor ->
           SymbolsView::moveToPosition.callCount is 1

        expect(atom.workspace.getActiveEditor().getCursorBufferPosition()).toEqual [9,2]
        SymbolsView::moveToPosition.reset()
        atom.workspace.getActiveEditor().setCursorBufferPosition([15,5])
        atom.workspaceView.getActiveView().trigger 'symbols-view:go-to-declaration'

      waitsFor ->
        SymbolsView::moveToPosition.callCount is 1


      runs ->
        expect(symbolsView.loading).toBeEmpty()
        expect($(atom.views.getView(atom.workspace)).find('.symbols-view')).toExist()
        expect(symbolsView.list.children('li').length).toBe 2
        expect(symbolsView.list.children('li:first').find('.primary-line')).toHaveText 'quicksort'
        expect(symbolsView.list.children('li:first').find('.secondary-line')).toHaveText 'Line 1'
