       spy = sinon.spy(Backbone.history, 'stop')
       expect(router.stopHistory).to.be.a 'function'
       router.stopHistory()
-      expect(Backbone.History.started).to.not.be.ok()
+      expect(Backbone.History.started).to.be false
       expect(spy).was.called()
 
     it 'should have a match method which returns a route', ->


    it 'should listen to the !router:route event', ->
      path = 'router-route-events'
      sinon.spy(router, 'route')
      spy = sinon.spy()
      router.match path, 'router#route'

      mediator.publish '!router:route', path, spy
      expect(router.route).was.calledWith path
      expect(spy).was.calledWith true
      expect(route.controller).to.be 'router'
      expect(route.action).to.be 'route'

      spy = sinon.spy()
      mediator.publish '!router:route', 'different-path', spy
      expect(spy).was.calledWith false

    it 'should listen to the !router:changeURL event', ->
      path = 'router-changeurl-events'
      sinon.spy(router, 'changeURL')

      mediator.publish '!router:changeURL', path
      expect(router.changeURL).was.calledWith path

    it 'should allow options to the passed through the !router:route event', ->
      path = 'router-route-events-options'
      sinon.spy(router, 'route')
      spy = sinon.spy()
      router.match path, 'router#route'

      mediator.publish '!router:route', path, replace: true, spy
      expect(router.route).was.calledWith path, replace: true, changeURL: true
      expect(spy).was.calledWith true
      expect(route.controller).to.be 'router'
      expect(route.action).to.be 'route'
      expect(options).to.eql replace: true, changeURL: true

    it 'should forward options passed through the !router:changeURL event', ->
      path = 'router-changeurl-options-events'
      sinon.spy(router, 'changeURL')

      mediator.publish '!router:changeURL', path, replace: true
      expect(router.changeURL).was.calledWith path,
        replace: true
        trigger: false

      navigate = sinon.spy(Backbone.history, 'navigate')

      Backbone.history.start()
      mediator.publish '!router:changeURL', path
      expect(Backbone.history.fragment).to.be path
      expect(Backbone.history.navigate).was.calledWith path,
        trigger: false

      path = 'router-changeurl-replace-events'
      mediator.publish '!router:changeURL', path
      expect(Backbone.history.fragment).to.be path
      expect(Backbone.history.navigate).was.calledWith path,
        trigger: false

      path = 'router-changeurl-replace-with-events'
      mediator.publish '!router:changeURL', path, replace: true
      expect(Backbone.history.fragment).to.be path
      expect(Backbone.history.navigate).was.calledWith path,
        trigger: false, replace: true

      Backbone.history.stop()

    it 'should dispose itself correctly', ->
      expect(router.dispose).to.be.a 'function'

      expect(Backbone.history).to.be.a Backbone.History

    it 'should not start the Backbone.History at once', ->
      expect(Backbone.History.started).to.be false

    it 'should allow to start the Backbone.History', ->
      spy = sinon.spy(Backbone.history, 'start')
