Created
January 27, 2010 15:45
-
-
Save erithmetic/287950 to your computer and use it in GitHub Desktop.
autotest for PHPUnit
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
# Prereqs: | |
# * Ruby | |
# * gem install watchr | |
# Usage: | |
# copy autounit to php project directory | |
# run watchr autounit | |
watch('test/.*Test\.php') do |md| | |
puts "\e[H\e[2J" #clear console | |
system("phpunit #{md[0]}") | |
end | |
watch('lib/(.*)\.php') do |md| # runs test/Class/* whenever lib/class.php is changed | |
puts "\e[H\e[2J" #clear console | |
testpath = md[1].sub(/./) { |s| s.upcase } | |
system("phpunit test/#{testpath}") | |
end |
awesome gamberz!!!11oneone11!!!!
phpunit watcher: https://github.com/slavahatnuke/hot-phpunit-runner
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nice gambeta !