Skip to content

Instantly share code, notes, and snippets.

@jerel
Created March 27, 2013 15:26
Show Gist options
  • Save jerel/5255082 to your computer and use it in GitHub Desktop.
Save jerel/5255082 to your computer and use it in GitHub Desktop.
Watch for changes using guard and run corresponding test
guard 'phpunit', :tests_path => 'tests', :cli => '--colors --bootstrap tests/bootstrap.php --strict --debug --verbose' do
# Watch test files
watch(%r{^.+Test\.php$})
# Watch library files and run their tests
watch(%r{^core/(.+)\.php}) { |m| "tests/core/#{m[1]}_Test.php" }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment