 			execGruntTask 'rebuild', (err) ->
 				if err then done() else done(new Error 'expected rebuild to fail')
 
+		it 'should pass node-gyp’s error to Grunt if there is no binding.gyp', (done) ->
+			unlinkBindingGyp()
+
+			execGruntTask 'configure', (err, stdout) ->
+				if stdout.indexOf('Warning: `gyp` failed with exit code: 1') < 0
+					return done(new Error 'expected node-gyp’s error to be in stdout')
+
+				done()
+
 	describe 'arch option', ->
 		it 'should build a 32-bit build if specified', (done) ->
 			linkBindingGyp()


			execGruntTask 'default', (err) ->
				if err then done() else done(new Error 'expected rebuild to fail')

			execGruntTask 'build', (err) ->
				if err then done() else done(new Error 'expected build to fail')

		it 'should pass node-gyp’s error to Grunt if there are no build files', (done) ->
			rmBuildFiles()

			execGruntTask 'build', (err, stdout) ->
				if stdout.indexOf('Warning: You must run `node-gyp configure` first!') < 0
					return done(new Error 'expected node-gyp’s error to be in stdout')

				done()

	describe 'clean', ->
		it 'should remove the build directory', (done) ->
			execGruntTask 'clean', (err) ->
