 	'should replace a file in a raspberry pi partition with a regex'
 	(output) ->
 		inputStream = fs.createReadStream(LOREM)
-		imagefs.write(output, inputStream).then(utils.waitStream).then ->
-			imagefs.replace(output, /m/g, 'n').then(utils.waitStream).then ->
-				imagefs.read(output).then(utils.extract).then (contents) ->
-					utils.expect(contents, 'Loren ipsun dolor sit anet\n')
+		imagefs.write(output, inputStream)
+		.then(utils.waitStream)
+		.then ->
+			imagefs.replace(output, /m/g, 'n')
+		.then(utils.waitStream)
+		.then ->
+			imagefs.read(output)
+		.then(utils.extract)
+		.then (contents) ->
+			utils.expect(contents, 'Loren ipsun dolor sit anet\n')
 	{
 		image: RASPBERRYPI
 		partition:

	'should replace a file in a raspberry pi partition'
	(output) ->
		inputStream = fs.createReadStream(LOREM)
		imagefs.write(output, inputStream).then(utils.waitStream).then ->
			imagefs.replace(output, 'Lorem', 'Elementum').then(utils.waitStream).then ->
				imagefs.read(output).then(utils.extract).then (contents) ->
					utils.expect(contents, 'Elementum ipsum dolor sit amet\n')
	{
		image: RASPBERRYPI
		partition:

	'should replace a file in an edison config partition with a local file'
	(output) ->
		inputStream = fs.createReadStream(LOREM)
		imagefs.write(output, inputStream)
		.then(utils.waitStream)
		.then ->
			imagefs.read(output)
		.then(utils.extract)
		.then (contents) ->
			utils.expect(contents.replace('\r', ''), 'Lorem ipsum dolor sit amet\n')
	{
		image: EDISON
		path: '/config.json'
