Skip to content

Instantly share code, notes, and snippets.

@mishbah
Created Aug 21, 2015
Embed
What would you like to do?
Gulpfile for TDD
var gulp = require('gulp');
var phpspec = require('gulp-phpspec');
var run = require('gulp-run');
var notify = require('gulp-notify');
gulp.task('test', function(){
run('clear', {'usePowerShell': true}).exec('Vinyl', function(){
gulp.src('spec/**/*.php')
.pipe(phpspec('', { notify: true}))
.on('error', notify.onError({
title: 'Dongdong',
message: 'Testnya gagal agan Misbah',
}))
.pipe(notify({
title: 'Alhamdulillah',
message: 'Semua berjalan lancar'
}));
});
});
gulp.task('watch', function () {
gulp.watch(['spec/**/*.php', 'src/**/*.php'], ['test'])
});
gulp.task('default', ['watch']);
@mishbah

This comment has been minimized.

Copy link
Owner Author

@mishbah mishbah commented Aug 21, 2015

This is for windows version
For mac you can use https://gist.github.com/52a9f085408605a06400.git

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment