Permalink
Browse files

added spec for delayed api

  • Loading branch information...
1 parent 568cc31 commit 3d87c7a0031ea0fd6240629301dfe2750f925830 @JakubOboza committed Apr 29, 2012
Showing with 20 additions and 0 deletions.
  1. +20 −0 spec/future_toons.spec.js
View
@@ -38,6 +38,26 @@ describe('Future Toons', function(){
});
+ it("should be able to delay execution", function(done){
+
+ var count = 0;
+
+ var line_cb = function(line){
+ count = count + 1;
+ };
+
+ var end_cb = function(){
+ done();
+ count.should.equal(4);
+ }
+
+ var streamer = new toons();
+ streamer.onLine(line_cb);
+ streamer.onEnd(end_cb);
+ streamer.run("./spec/fixtures/four_line.file");
+
+ });
+
});
});

0 comments on commit 3d87c7a

Please sign in to comment.