     fs.unlinkSync mock_basic_files.css if fs.existsSync mock_basic_files.css
 
 
+  describe '[general]', ->
+    it 'should show version number `-v`', ->
+      errors = outs = 0
+
+      options = version: true
+      stdio = 
+        nocolor: true
+        err:(msg) -> errors++
+        out:(version) ->
+          outs++
+          version.should.equal require('../../package.json').version
+
+      version = polvo options, stdio
+
+      outs.should.equal 1
+      errors.should.equal 0
+
+    it 'should show the help screen `-h`', ->
+      errors = outs = 0
+
+      options = help: true
+      stdio = 
+        nocolor: true
+        err:(msg) -> errors++
+        out:(help) ->
+          outs++
+          help.indexOf('Polyvalent cephalopod mollusc').should.not.equal -1
+          help.indexOf('Usage').should.not.equal -1
+          help.indexOf('Options').should.not.equal -1
+          help.indexOf('Examples').should.not.equal -1
+
+      help = polvo null, stdio
+
+      outs.should.equal 1
+      errors.should.equal 0
+
+
   describe '[mock:basic]', ->
     it 'should alert about no `package.json` file plugins during compile', ->
       errors = outs = 0

      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

      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
