var expect = require('chai').expect;
var sinon = require('sinon');

var prepare = require('../../lib/prepare');
var fs = require('fs');

describe('lib/prepare', function () {
  it('removes data.textPath and place the content of its file to data.text', function () {
    sinon.stub(fs, 'readFileSync');
    prepare({textPath: 'textPath'});
    expect(fs.readFileSync.callCount).to.equal(1);
    fs.readFileSync.restore();
  });
});

@@ -168,16 +168,17 @@
 on () %7B%0A
+%0A
   it('re
@@ -268,74 +268,123 @@
     
-sinon.stub(fs, 'readFileSync');%0A    prepare(%7BtextPath: 'textPath'%7D
+var data = %7B%0A      textPath: 'textPath'%0A    %7D;%0A    sinon.stub(fs, 'readFileSync').returns('text');%0A    prepare(data
 );%0A 
@@ -433,16 +433,56 @@
 ual(1);%0A
+    expect(data.text).to.equal('text');%0A
     fs.r
@@ -508,14 +508,15 @@
 ();%0A
-
   %7D);%0A
+%0A
 %7D);%0A

Update test: check lib/prepare's file reading