/** @overview nodeunit test case. */

var fs = require('fs'),
    testResource = require('../../../test_resource'),
    compileCoffeeScriptFile = require('../../../../lib/compile/compile_coffee_script_file.js');

exports.setUp = function (done) {
    done();
};

exports.tearDown = function (done) {
    done();
};


exports['Compile coffee script file.'] = function (test) {
    var src = testResource.resolveMockFile('mock-coffee-script.coffee'),
        dest = testResource.resolveWorkFile('work-coffee-script.js');
    compileCoffeeScriptFile(
        src, dest, function (err) {
            test.ifError(err);
            fs.exists(dest, function (exists) {
                test.ok(exists);
                test.done();
            });
        }
    )
};