--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Modifies expectation so that when the expected method is called, it raises the specified <tt>exception</tt> with the specified <tt>message</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "  object = mock()\n  object.expects(:expected_method).raises(Exception, 'message')\n  object.expected_method # =&gt; raises exception of class Exception and with message 'message'\n"
- !ruby/struct:SM::Flow::P 
  body: May be called multiple times on the same expectation. Also see Expectation#then.
- !ruby/struct:SM::Flow::VERB 
  body: "  object = mock()\n  object.stubs(:expected_method).raises(Exception1).then.raises(Exception2)\n  object.expected_method # =&gt; raises exception of class Exception1\n  object.expected_method # =&gt; raises exception of class Exception2\n"
- !ruby/struct:SM::Flow::P 
  body: May be called in conjunction with Expectation#returns on the same expectation.
- !ruby/struct:SM::Flow::VERB 
  body: "  object = mock()\n  object.stubs(:expected_method).raises(Exception).then.returns(2, 3)\n  object.expected_method # =&gt; raises exception of class Exception1\n  object.expected_method # =&gt; 2\n  object.expected_method # =&gt; 3\n"
full_name: Mocha::Expectation#raises
is_singleton: false
name: raises
params: " raises(exception = RuntimeError, message = nil) -> expectation\n"
visibility: public
