def raises(err=nil)
      case err
      when Exception
        @options[:raises] = err
      when String
        @options[:raises] = RuntimeError.new(err)
      else
        @options[:raises] = RuntimeError.new("An Error")
      end
      self
    end
def raises(err=nil)
      case err
      when Exception
        @options[:raises] = err
      when String
        @options[:raises] = RuntimeError.new(err)
      else
        @options[:raises] = RuntimeError.new("An Error")
      end
      self
    end
Rig an expected method to raise an exception when the mock is invoked.

 Eg,
   @cash_machine.expects.withdraw(20,:dollars).raises "Insufficient funds"

 The argument can be:
 * an Exception -- will be used directly
 * a String -- will be used as the message for a RuntimeError
 * nothing -- RuntimeError.new("An Error") will be raised