       done()
 
   it 'should compile stylus with roots css', ->
-    fs.existsSync(path.join(test_path, 'public/basic.css')).should.be.ok
+    files_exist test_path, ['public/basic.css']
 
   it 'should include the project directory for requires', ->
-    fs.existsSync(path.join(test_path, 'public/req.css')).should.be.ok
-    fs.existsSync(path.join(test_path, 'public/nested/all.css')).should.be.ok
+    files_exist test_path, ['public/req.css', 'public/nested/all.css']
     require_content = fs.readFileSync path.join(test_path, 'public/req.css'), 'utf8'
     require_content.should.match /#000/
-    shell.rm '-rf', path.join(test_path, 'public')
+
+  after ->
+    remove path.join(test_path, 'public')
 
 describe 'static files', ->
   test_path = path.join root, './static'


  it 'should compile coffeescript and requires should work', (done) ->
    run "cd \"#{test_path}\"; ../../bin/roots compile --no-compress", ->
      fs.existsSync(path.join(test_path, 'public/basic.js')).should.be.ok
      fs.existsSync(path.join(test_path, 'public/require.js')).should.be.ok
      require_content = fs.readFileSync path.join(test_path, 'public/require.js'), 'utf8'
      require_content.should.match /BASIC/
      shell.rm '-rf', path.join(test_path, 'public')
      done()

  it 'should compile without closures when specified in app.coffee', (done) ->
    run "cd \"#{test_path_2}\"; ../../bin/roots compile --no-compress", ->
      fs.existsSync(path.join(test_path_2, 'public/testz.js')).should.be.ok
      require_content = fs.readFileSync path.join(test_path_2, 'public/testz.js'), 'utf8'
      require_content.should.not.match /function/
      shell.rm '-rf', path.join(test_path_2, 'public')
      done()

describe 'stylus', ->
  test_path = path.join root, './stylus'

    content = fs.readFileSync path.join(test_path, 'public/index.html'), 'utf8'
    content.should.match(/\<p\>This is my first blog post.*\<\/p\>/)

  after ->
    remove path.join(test_path, 'public')

describe 'precompiled templates', ->
  test_path = path.join root, './precompile'

