         expect(pong).toBe('pong')
 
   it "recognises the client's state after boot", ->
-    expect(juno.connection.client.isConnected()).toBe(true)
-    expect(juno.connection.client.isActive()).toBe(true)
+    expect(clientStatus()).toEqual [true, true, false]
 
   {echo, evalsimple} = juno.connection.client.import ['echo', 'evalsimple']
 

    msg = {x: 1, y: 2}
    waitsForPromise ->
      echo(msg).then (response) ->
        expect(msg).toBe(msg)

    waitsForPromise ->
      evalsimple("2+2").then (result) ->

    waitsForPromise ->
      atom.packages.activatePackage 'julia-client'

describe "managing the Julia process", ->
  client = juno.connection.client
  clientStatus = -> [client.isConnected(), client.isActive(), client.isWorking()]
  it "recognises the client's state before boot", ->
    expect(clientStatus()).toEqual [false, false, false]

  bootPromise = null
  it "initiates the boot", ->
    bootPromise = juno.connection.boot()

  it "recognises the client's state during boot", ->
    expect(clientStatus()).toEqual [false, true, true]

  it "waits for the boot to complete", ->
    waitsForPromise ->
