Skip to content

Instantly share code, notes, and snippets.

@rohinomiya
Created September 11, 2011 09:40
Show Gist options
  • Save rohinomiya/1209397 to your computer and use it in GitHub Desktop.
Save rohinomiya/1209397 to your computer and use it in GitHub Desktop.
watchr setting sample
require 'watchr'
def run(cmd)
cmd = "phpunit #{cmd}"
puts "$ #{cmd}"
system cmd
end
watch("^src/(.*).php") { |m| run "tests/#{m[1]}Test" }
watch("^tests/(.*)Test.php") { |m| run "tests/#{m[1]}Test" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment