       new setTimeout ->
         fs.writeFileSync mock_basic_files.app, backup
       , 3000
+
+      # editing a partial
+      new setTimeout ->
+        fs.appendFileSync mock_basic_files.partial, ' '
+      , 4000
+
+      # deleting a vendor
+      new setTimeout ->
+        fs.unlinkSync mock_basic_files.vendor
+      , 5000
+
+      # creating a vendor
+      vendor_backup = fs.readFileSync(mock_basic_files.vendor).toString()
+      new setTimeout ->
+        fs.writeFileSync mock_basic_files.vendor, vendor_backup
+      , 6000
+
+      # editing a vendor
+      new setTimeout ->
+        fs.appendFileSync mock_basic_files.vendor, ' '
+      , 7000
+
+
 
     it 'should start app and serve it', (done)->
       @timeout 4000

      fs.writeFileSync mock_basic_files.mock_basic_pack, mock_basic_pack
      server = polvo options, stdio

    it 'version should be printed properly with `polvo -v`', ->
      errors = outs = 0

      options = version: true
      stdio = 
        nocolor: true
        err:(msg) -> errors++
        out:(version) ->
          outs++
          version.should.equal require('../../package.json').version

      fs.writeFileSync mock_basic_files.mock_basic_pack, mock_basic_pack
      version = polvo options, stdio

      outs.should.equal 1
      errors.should.equal 0

    it 'should start app and perform crate/change/delete files events in watch mode', (done)->
      @timeout 6000 

      errors = outs = 0
      checkers = [
        /✓ public\/app\.js.+/
        /✓ public\/app\.css.+/

        /\• src\/app\/app.coffee/
        /✓ public\/app\.js/

        /\- src\/app\/app.coffee/
        /✓ public\/app\.js/

        /\+ src\/app\/app\.coffee/
        /✓ public\/app\.js/
      ]

      options = watch: 'true', base: mock_basic
      stdio = 
        out:(msg) ->
          checkers.shift().test(msg).should.be.true
          if checkers.length is 0
            watch.close()
            errors.should.equal 0
            done()

        err:(msg) -> errors++
        nocolor: true

      fs.writeFileSync mock_basic_files.mock_basic_pack, mock_basic_pack
      backup = fs.readFileSync mock_basic_files.app

      polvo = require '../../lib/polvo'
      watch = polvo options, stdio

      # editing
      new setTimeout ->
        fs.appendFileSync mock_basic_files.app, '\n\na = 1\n'
      , 1000

      # deleting

mock_basic_files = 
  mock_basic_pack: path.join mock_basic, 'package.json'
  app: path.join mock_basic, 'src', 'app', 'app.coffee'
  vendor: path.join mock_basic, 'vendors', 'some.vendor.js'
  partial: path.join mock_basic, 'src', 'templates', '_header.jade'
  mock_basic_config: path.join mock_basic, 'polvo.yml'
  js: path.join mock_basic, 'public', 'app.js'
  css: path.join mock_basic, 'public', 'app.css'
