 
       runs ->
         symbolsView = $(getWorkspaceView()).find('.symbols-view').view()
-        expect(symbolsView.loading).toBeVisible()
+
+      waitsFor "loading", ->
+        symbolsView.setLoading.callCount is 1
 
       waitsFor ->
         symbolsView.list.children('li').length > 0

        atom.workspace.getActiveTextEditor().setGrammar(atom.grammars.grammarForScopeName('source.js'))
        atom.commands.dispatch(getEditorView(), "symbols-view:toggle-file-symbols")
        symbolsView = $(getWorkspaceView()).find('.symbols-view').view()
        expect(symbolsView.loading).toBeVisible()

      waitsFor ->
        symbolsView.list.children('li').length is 1

  getEditorView = -> atom.views.getView(atom.workspace.getActiveTextEditor())

  beforeEach ->
    spyOn(SymbolsView::, "setLoading").andCallThrough()

    atom.project.setPaths([
      temp.mkdirSync("other-dir-")
      temp.mkdirSync('atom-symbols-view-')
