Topic: How to return an exception for method in controller by using stub/mock

Hi friends,
   How to return an exception for method in controller by using stub/mock.
For example
In my controller

def search
 myob.get_result(string)        # i want to stub/mock this line  and return exception and then it would be go to rescue block
 rescue Exception => e
 #errorhandling
end

Can anybody help.thanks in advance.