       if Object.isFrozen
         expect(Object.isFrozen(router)).to.be true
 
+    # Extendability
+    # -------------
+
     it 'should be extendable', ->
       expect(Router.extend).to.be.a 'function'
-      # Also test Route
       expect(Route.extend).to.be.a 'function'
 
       DerivedRouter = Router.extend()

      mediator.subscribe 'matchRoute', matchRoute

    afterEach ->
      route = params = null
      router.dispose()
      mediator.unsubscribe 'matchRoute', matchRoute


      , '?')

      router.route "query-string#{queryString}"
      expect(passedParams.foo).to.be input.foo
      expect(passedParams.bar).to.be input.bar
      expect(passedParams['q&uu=x']).to.be input['q&uu=x']

    it 'should extract named parameters along with query params', ->
      router.match 'params/:one', 'null#null'
      router.route '/params/named?foo=query123&bar=query_456&qux=789%20query'
      expect(passedParams).to.be.an 'object'
      expect(passedParams.one).to.be 'named'
      expect(passedParams.foo).to.be 'query123'
      expect(passedParams.bar).to.be 'query_456'
      expect(passedParams.qux).to.be '789 query'

    it 'should extract named parameters along with splats', ->
      router.match 'params/*one', 'null#null'
      router.route '/params/foo/bar/qux?foo=query123&bar=query_456&qux=789%20query'
      expect(passedParams).to.be.an 'object'
      expect(passedParams.one).to.be 'foo/bar/qux'
      expect(passedParams.foo).to.be 'query123'
      expect(passedParams.bar).to.be 'query_456'
      expect(passedParams.qux).to.be '789 query'

    # Routing options
    # ---------------

    it 'should pass routing options and add the path', ->
      router.match 'foo', 'null#null'
      path = '/foo'
      options = routingOptions: true
      router.route path, options
      expect(passedParams).to.be.an 'object'
      expect(passedParams).to.be.empty()
      expect(passedOptions).to.eql _.extend(options, {path})

    # Listening to the the !router:route event
    # ----------------------------------------

    it 'should listen to the !router:route event', ->
      path = 'router-route-event'
      options = replace: true, changeURL: true
      callback = sinon.spy()

      routeSpy = sinon.spy router, 'route'
      router.match path, 'router#route'

      mediator.publish '!router:route', path, options, callback
      expect(routeSpy).was.calledWith path, options
      expect(callback).was.calledWith true
      expect(passedRoute).to.be.an 'object'
      expect(passedRoute.controller).to.be 'router'
      expect(passedRoute.action).to.be 'route'
      expect(passedOptions).to.eql _.extend(options, {path})

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

      routeSpy.restore()

    # Listening to the !router:changeURL event
    # ----------------------------------------

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

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

      changeURL.restore()

    it 'should forward changeURL routing options to Backbone', ->
      path = 'router-changeurl-options'
