Skip to content

Instantly share code, notes, and snippets.

@dj1020
Forked from mikeerickson/gulpfile.js
Last active August 29, 2015 14:20
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 dj1020/70866eb0b28d8130b9e0 to your computer and use it in GitHub Desktop.
Save dj1020/70866eb0b28d8130b9e0 to your computer and use it in GitHub Desktop.
Gulp with Phpspec edited from Mike Erickson
/* 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