         2000
       )
       setTimeout(
-        () ->  window.location.hash = ""
+        () ->
+          window.location.hash = ""
+          done()
         2400
       )
 

      $("#my-div").trigger("click")


    it "Plain Routing", ->
      $("body").append("<div id='links'></div>")
      arr = ["/", "/post/12", "/post/abc", "/post/x/a/b/c", "/static", "/error", "/"]
      for a in arr
        $('#links').append($("<a></a>").attr({'href':a}))

      Controller =
        error: (current) ->
          expect(current).toEqual("#/error")

        title: (title) ->
          expect(title).toEqual("abc")


      r =
        "/": () -> expect(arguments.length).toEqual(0)
        "/post/[0-9]+" : (id) ->
          expect(arguments.length).toEqual(1)
          expect(id).toEqual(12)
        "/post/:title" : {controller: Controller, action: "title"}
        "/post/x/*": () -> expect(arguments.length).toEqual(3)
        "/static" : () -> expect(arguments.length).toEqual(0)
        404: {controller: Controller, action: "error"}


      Sirius.Application.run({
        route: r,

        links = $("#links a")
        for l in links
          $(l).trigger("click")
        done()
        2800
      )

    it "test", (done) ->
      expect(emptyValue).toEqual(0)
      expect(postValue).toEqual("12")
      expect(titleValue).toEqual("abc")
      expect(errorValue).toEqual("/error")
      expect(postXValue).toEqual(3)
      expect(staticValue).toEqual(0)
      done()







