 
 describe 'Main Tests', ->
   activationPromise = null
-  treeViewPromise = null
   loginView = null
   sparkIde = null
   originalProfile = null


  describe 'when the spark-ide:claim-core-manually event is triggered', ->
    it 'calls claimCoreManually() method', ->
      waitsForPromise ->
        treeViewPromise

      runs ->
        spyOn sparkIde, 'claimCoreManually'
        atom.workspaceView.trigger 'spark-ide:claim-core-manually'
        expect(sparkIde.claimCoreManually).toHaveBeenCalled()
        jasmine.unspy sparkIde, 'claimCoreManually'

    activationPromise = atom.packages.activatePackage('spark-ide').then ({mainModule}) ->
      sparkIde = mainModule
      loginView = mainModule.loginView

    originalProfile = SettingsHelper.getProfile()
    # For tests not to mess up our profile, we have to switch to test one...
