 
       isRegistered = no
       appInstance  = new AppController name: 'FooApp'
-      sinon.spy(appManager, 'setListeners')
+      expect.spyOn appManager, 'setListeners'
 
       appManager.on 'AppRegistered', -> isRegistered = yes
       appManager.register appInstance
 
       expect(appManager.appControllers.FooApp.instances).toInclude appInstance
-      expect(appManager.setListeners.calledOnce).toBe yes
+      expect(appManager.setListeners).toHaveBeenCalled()
       expect(isRegistered).toBe yes
 
 


    it 'should warn if there is no name', ->

      sinon.spy(kd, 'warn')

      appManager.tell()

      expect(kd.warn.calledOnce).toBe yes


  describe '::create', ->

kd                 = require 'kd'
expect             = require 'expect'
globals            = require 'globals'
AppController      = require '../lib/appcontroller'
registerAppClass   = require '../lib/util/registerAppClass'
