rake test swallowing errors

I am trying to write a rake commit task so that before I commit changes to svn it executes my unit tests. I have a failing unit test, but the test:units is not raising the exception so my commit task still executes.

Example:

task :commit => :test do   #should not reach because I have a failing test, but the test task passes anyway and executes this   #subversion commit done here end