       done()
 
   it 'should fail with additional arguments', (done) ->
-    stub = path.join __dirname, 'stubs', 'nodeps'
+    stub = path.join stubsdir, 'nodeps'
     bin [stub, 'bad arg'], (err, stdout, stderr) ->
       should.exist err
       stdout.should.equal ''

      done()

  it 'should support commonjs kdapps', (done) ->
    stub = path.join __dirname, 'stubs', 'commonjs'
    bin [stub], (err, stdout, stderr) ->
      should.not.exist err
      stdout.should.equal ''



describe 'bin/kdc-plus', ->
  bin       = null
  stubsdir  = path.join process.cwd(), 'build', 'test', 'stubs'
  before -> bin = binGen 'kdc-plus'

  it 'should log to stderr not stdout', (done) ->
