   activationPromise = null
   selectCoreView = null
   originalProfile = null
+  sparkIde = null
 
   beforeEach ->
     atom.workspaceView = new WorkspaceView
     activationPromise = atom.packages.activatePackage('spark-ide').then ({mainModule}) ->
-      selectCoreView = mainModule.selectCoreView
+      sparkIde = mainModule
 
     originalProfile = SettingsHelper.getProfile()
     # For tests not to mess up our profile, we have to switch to test one...

        SettingsHelper.clearCredentials()
        atom.workspaceView.trigger 'core:close'

    it 'tests choosing core', ->
      # TODO: Implement

      SettingsHelper.setCredentials 'foo@bar.baz', '0123456789abcdef0123456789abcdef'

      atom.workspaceView.trigger 'spark-ide:select-core'
      selectCoreView = sparkIde.selectCoreView

      expect(atom.workspaceView.find('#spark-ide-select-core-view')).toExist()
      expect(selectCoreView.find('div.loading').css('display')).toEqual('block')
