Friday, July 20, 2012

Run all tests related to a method you just refactored

$ sudo apt-get install ack-grep

For Ruby:
$ ack-grep "method_foo_bar" -l spec | xargs script/spec

For PHP
$ ack-grep "method_foo_bar" -l tests | xargs phpunit

Post a Comment