var should = require('should'), 
    expect = require('expect.js'),
    sinon  = require('sinon'),
    Repository = require('../lib/repository'),
    util   = require('util'),
    fs     = require('fs');

describe("Repository", function() {
  it("Should init successfully", function(done) {
    var repo = new Repository(process.cwd() + "/test/files");
    repo.init(function(err, files) {
      (files.length).should.be.exactly(2);
      done();
    });
  });
});
@@ -453,12 +453,416 @@
 );%0A  %7D);
+%0A%0A  it(%22Should write a file successfully%22, function(done) %7B%0A    var repo = new Repository(process.cwd() + %22/test/files%22);%0A    repo.init(function(err, files) %7B%0A      (files.length).should.be.exactly(2);%0A      var file = new File(%22test.md%22,%22%5BAdd some content%5D(#DONE:0)%22);%0A      repo.writeFile(file, function(err, tasks) %7B%0A        (tasks.length).should.be.exactly(1);%0A        done();%0A      %7D)%0A    %7D);%0A%0A  %7D);
 %0A%7D);

Test init