Skip to content

Instantly share code, notes, and snippets.

@chadrien
Last active August 29, 2015 13:56
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 chadrien/8860313 to your computer and use it in GitHub Desktop.
Save chadrien/8860313 to your computer and use it in GitHub Desktop.
CakePHP unit tests guardfile
group 'tests' do
guard 'shell' do
watch(%r{^(?:(?!(?:Plugin|Test)/)(.+)\.php)*$}) {|m| `cake test app #{m[1]}` }
watch(%r{^Plugin/([^/]+)/(?:(?!Test)(.+)\.php)*$}) {|m| `cake test #{m[1]} #{m[2]}` }
watch(%r{^Test/Case/(.+)Test\.php$}) {|m| `cake test app #{m[1]}` }
watch(%r{^Plugin/([^/]+)/Test/Case/(.+)Test\.php$}) {|m| `cake test #{m[1]} #{m[2]}` }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment