var test = require('tape')
var fs = require('fs')
var extend = require('../lib/extend-config.js')

test('extend-config', function (t) {
	var config
	var thePath = __dirname + '/.deleteme'
	config = extend({path: thePath})

	t.equal(typeof config, typeof {}, 'config should be an object')
	t.equal(typeof config.path, 'string', 'config.path should be a string')
	t.ok(fs.existsSync(thePath), 'should create a dir for config.path if config.path does not exist')
	t.ok(fs.existsSync(thePath + '/stacks.list'), 'should create a stacks.list file in config.path if that file does not exist')
	// Overwrite stacks.list
	fs.writeFileSync(thePath + '/stacks.list', 'yo')
	extend({path: thePath})
	t.equal(fs.readFileSync(thePath + '/stacks.list').toString(), 'yo', 'extendConfig should not overwrite stacks.list')

	require('rimraf').sync(thePath)
	t.end()
})

@@ -24,31 +24,8 @@
 e')%0A
-var fs = require('fs')%0A
 var 
@@ -123,81 +123,25 @@
 ig%0A%09
-var thePath = __dirname + '/.deleteme'%0A%09config = extend(%7Bpath: thePath%7D)%0A
+config = extend()
 %0A%09t.
@@ -280,309 +280,17 @@
 ')%0A%09
-t.ok(fs.existsSync(thePath), 'should create a dir for config.path if config.path does not exist')%0A%09t.ok(fs.existsSync(thePath + '/stacks.list'), 'should create a stacks.list file in config.path if that file does not exist')%0A%09// Overwrite stacks.list%0A%09fs.writeFileSync(thePath + '/stacks.list', 'yo')%0A%09
+config = 
 exte
@@ -299,23 +299,19 @@
 (%7Bpath: 
-thePath
+'x'
 %7D)%0A%09t.eq
@@ -318,81 +318,38 @@
 ual(
-fs.readFileSync(thePath + '/stacks.list').toString(), 'yo
+config.path, 'x
 ', '
-extendConfig
+config.path
  sho
@@ -360,64 +360,22 @@
 not 
+be 
 over
-w
 ri
-te stacks.list')%0A%0A%09require('rimraf').sync(thePath
+dden'
 )%0A%09t

Change extend-config specifications