Skip to content

Instantly share code, notes, and snippets.

@rwjblue
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rwjblue/356faa8a2ca3cb08e9f9 to your computer and use it in GitHub Desktop.
Save rwjblue/356faa8a2ca3cb08e9f9 to your computer and use it in GitHub Desktop.
var runCommand = require('../helpers/run-command');
var childProcess = require('child_process');
function ifHasGit(callback) {
return new Promise(function(resolve) {
childProcess.exec('git --version', function(error){
if (!!error) {
callback();
}
})
})
}
it('calls git init when git is present', function() {
return ifHasGit(function(){
// do your actual assertions here
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment