edubkendo
9/11/2012 - 1:07 PM

test checking that gists get created

test checking that gists get created

    it "should create a gist after ten messages", (done) ->
      spy = sinon.spy App.Message, "gistify"
      for num in [1..11]
        message = App.Message.new()
        message.setProperties(
          body: "A body #{num}"
          user: "A user #{num}"
          )
        message.save()
      setTimeout ->
        spy.should.have.been.calledOnce        
        done()
      , 20