-
-
Save dj1020/70866eb0b28d8130b9e0 to your computer and use it in GitHub Desktop.
Gulp with Phpspec edited from Mike Erickson
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Gulpfile | |
* Mike Erickson | |
*/ | |
var gulp = require('gulp'), | |
notify = require('gulp-notify'), | |
phpspec = require('gulp-phpspec'); | |
gulp.task('phpspec', function() { | |
var options = { | |
debug: true | |
}; | |
gulp.src('spec/**/*.php') | |
.pipe(phpspec('', options)) | |
.on('error', notify.onError({ | |
title: "Testing Failed", | |
message: "Error(s) occurred during test..." | |
})); | |
}); | |
// set watch task to look for changes in test files | |
gulp.task('watch', function() { | |
gulp.watch('spec/**/*.php', ['phpspec']); | |
gulp.watch('src/**/*.php', ['phpspec']); | |
}); | |
// The default task (called when you run `gulp` from cli) | |
gulp.task('default', ['phpspec', 'watch']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment