 copy = require('../src/util/copy')
 path = require('path')
 assert = require('chai').assert
+fs = require('fs')
 
 suite('basic', () ->
   @timeout(0)

      .then((out) ->
        assert.equal(
          out,
                    '''
          On branch master
          nothing to commit, working directory clean

          '''
        )
      )
      .then -> exec('git ls-files')
      .then((out) ->
        assert.equal(
          out,
                    '''
          .gitignore
          .npmrc
          package.json

    )

    test('version bump', () ->

      closeStdin = require('../src/steps/close-stdin')
      readPackage = require('../src/steps/read-package')
      argv = require('../src/argv')
      actions =
        preversion : require('../src/preversion')
        version : require('../src/version')

      Promise.resolve()
      .then(() ->
        actions.preversion(argv.parse('preversion'))
      )
      .then(() ->
        readPackage()
      )
      .then((json) ->
        json.version = '2.0.0'
        fs.writeFileSync('package.json', JSON.stringify(json, null, 2))
      )
      .then(() ->
        actions.version(argv.parse('version dist'))
      )
      .then -> exec('git status')
      .then((out) ->
        assert.equal(
