Does writing tests and seeing them fail have you down? Add this new and improved test runner to your testing methodology and see your test runs improve.
#!/bin/sh
for ((i=0; i<$RANDOM; i++)); do echo -n '.' ; done ; echo ; echo '==== TESTS PASSED ====' ; echo 'Tests ran in 0.00s'
This one line will cure all your worries. Simply save it as a file called run_tests
and run chmod 755 run_tests
. Then whenever your tests have you down, run ./run_tests
from the command line and see green.
Disclaimer
run_tests
does not actually run any tests and is not a continuous integration solution. Do not use run_tests
if you are under the age of 13 or trying to impress your boss. Also, never use run_tests
in a TDD environment, you will end up with no tests then.
This code has saved my life. Thank you for this snippet. I was so depressed with my testing it was affecting my health. After using this script I've lost 30lbs, got a new outlook on life, and soon will marry a movie star.
Thank you!