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

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Adds an expectation that a method identified by <tt>method_name</tt> Symbol/String must be called exactly once with any parameters. Returns the new expectation which can be further modified by methods on Expectation.
- !ruby/struct:SM::Flow::VERB 
  body: "  object = mock()\n  object.expects(:method1)\n  object.method1\n  # no error raised\n\n  object = mock()\n  object.expects(:method1)\n  # error raised, because method1 not called exactly once\n"
- !ruby/struct:SM::Flow::P 
  body: If <tt>method_names_vs_return_values</tt> is a <tt>Hash</tt>, an expectation will be set up for each entry using the key as <tt>method_name</tt> and value as <tt>return_value</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "  object = mock()\n  object.expects(:method1 =&gt; :result1, :method2 =&gt; :result2)\n\n  # exactly equivalent to\n\n  object = mock()\n  object.expects(:method1).returns(:result1)\n  object.expects(:method2).returns(:result2)\n"
- !ruby/struct:SM::Flow::P 
  body: Aliased by <tt>__expects__</tt>
full_name: Mocha::Mock#expects
is_singleton: false
name: expects
params: " expects(method_name) -> expectation\n\
  expects(method_names_vs_return_values) -> last expectation\n"
visibility: public
