       spy = sinon.spy()
       mediator.subscribe '!router:route', spy
       path = '/an/internal/link'
-      a = $('<a>').attr('href', path).text('Hello World')
-        .appendTo(document.body)
-        .click()
-        .remove()
+      createLink(href: path).appendTo(document.body).click().remove()
       expect(spy).was.called()
       args = spy.lastCall.args
       passedPath = args[0]


      # Create a fresh router
      router = new Router()
      
      @expectWasNotRouted = (callback) ->
        spy = sinon.spy()
        mediator.subscribe '!router:route', spy
        link = $('<a>').text('Hello World')
        callback(link)
        link.appendTo(document.body).click().remove()
        expect(spy).was.notCalled()
        mediator.unsubscribe '!router:route', spy

    afterEach ->
      layout.dispose()

      spy = sinon.spy()
      mediator.subscribe '!router:route', spy
      path = '/another/link?foo=bar&baz=qux'
      createLink(href: path).appendTo(document.body).click().remove()
      args = spy.lastCall.args
      passedPath = args[0]
      passedCallback = args[1]
