 
     it "moves the cursor to the selected function", ->
       runs ->
-        expect(atom.workspace.getActiveTextEditor().getCursorBufferPosition()).toEqual [0,0]
+        expect(atom.workspace.getActiveTextEditor().getCursorBufferPosition()).toEqual [0, 0]
         expect($(getWorkspaceView()).find('.symbols-view')).not.toExist()
         atom.commands.dispatch(getEditorView(), "symbols-view:toggle-file-symbols")
 

        SymbolsView::moveToPosition.callCount is 1

      runs ->
        expect(atom.workspace.getActiveTextEditor().getCursorBufferPosition()).toEqual [5,2]
        SymbolsView::moveToPosition.reset()
        atom.workspace.getActiveTextEditor().setCursorBufferPosition([14,2])
        atom.commands.dispatch(getEditorView(), 'symbols-view:go-to-declaration')

      waitsFor ->
        SymbolsView::moveToPosition.callCount is 1

      runs ->
        expect(atom.workspace.getActiveTextEditor().getCursorBufferPosition()).toEqual [9,2]
        SymbolsView::moveToPosition.reset()
        atom.workspace.getActiveTextEditor().setCursorBufferPosition([15,5])
        atom.commands.dispatch(getEditorView(), 'symbols-view:go-to-declaration')

      waitsFor ->
        SymbolsView::moveToPosition.callCount is 1

      runs ->
        expect(atom.workspace.getActiveTextEditor().getCursorBufferPosition()).toEqual [1,2]

    describe "return from declaration", ->
      it "doesn't do anything when no go-to have been triggered", ->


      runs ->
        editor = atom.workspace.getActiveTextEditor()
        editor.setCursorBufferPosition([6, 24])
        spyOn(SymbolsView.prototype, "moveToPosition").andCallThrough()
        atom.commands.dispatch(getEditorView(), 'symbols-view:go-to-declaration')

