Make your shell beep at you
alias beep="echo -en \"\\007\""
Bingo! Then just clip it onto the end of a command, and when that command finishes, the terminal should beep (\007 is a character code that should make a sound when it's echoed).
rake;beep
And rake can run all the tests I've written for a rails app, and give me a yell when it finishes.