var tpct = require('..'),
    assert = require('assert'),
    read = require('fs').readFileSync,
    mkdirp = require('mkdirp');

describe('tpct', function() {

    before(function() { 
        mkdirp.sync('tmp')
    })


    it('should generate correct output', function() {
        tpct({
            src: 'test/fixtures/tpct.test.css',
            dest: 'tmp/tpct.css'
        });

        var actual = read('tmp/tpct.css').toString().trim(),
            expected = read('test/expected/tpct.expected.css', 'utf-8').toString().trim();
        assert.equal(actual, expected, 'Generated output should match expected file');
    });

    it('should throw error when no input file is supplied', function() {
        assert.throws(function() {
            tpct({
                src: '',
                dest: 'tmp/tpct.css'
            });
        }, Error);
    });

    it('should import from node_modules', function() {
        tpct({
            src: 'test/fixtures/tpct.import.test.css',
            dest: 'tmp/tpct.import.css'
        });

        var actual = read('tmp/tpct.import.css').toString().trim(),
            expected = read('test/expected/tpct.import.expected.css', 'utf-8').toString().trim();
        assert.equal(actual, expected, 'Generated output should match expected file');
    });

});

@@ -177,17 +177,16 @@
 tion() %7B
- 
 %0A       
@@ -204,23 +204,25 @@
 c('tmp')
+;
 %0A    %7D)
+;
 %0A%0A%0A    i

Adding semicolons @brianleroux :P