How do you run NUnit from rake? do you use "sh"?
This is how you use "sh" to execute a shell command and intercept the result.
I just use an empty block to ignore any result (unsuccessful or successful)
sh "your shell command" do |ok,res|
puts this exception when shutting down the server, so ccnet knows that the build failed
raise "NUnit failed" if nunitSuccessFlag == false
alternative: use the try catch block as specified by the user above, as shown in this link: Rake Task: error handling (shut down the server in the provisioning block)
source share