Deployment problem

The problem is am using windows and the server is Mongrel. I am not
using Capistrano for deployment. Am running the Rakefile from Luntbuild
.In Rakefile I just copy the application on my test server to the
development server. When I calling the rake it is doing the tests and
copying the application to another server. But I don’t know how to check
if all test passes from the rake file so that, the copy task should
perform when all test passes.
The main issue is how to check test status in rake file. I
tried capistrano for the deployment, but it is showing errors
Please help.