--- !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 must be called exactly once with any parameters. Returns the new expectation which can be further modified by methods on Mocha::Expectation.
- !ruby/struct:SM::Flow::VERB 
  body: "  product = Product.new\n  product.expects(:save).returns(true)\n  assert_equal true, product.save\n"
- !ruby/struct:SM::Flow::P 
  body: The original implementation of <tt>Product#save</tt> is replaced temporarily.
- !ruby/struct:SM::Flow::P 
  body: The original implementation of <tt>Product#save</tt> is restored at the end of the test.
- !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: "  product = Product.new\n  product.expects(:valid? =&gt; true, :save =&gt; true)\n\n  # exactly equivalent to\n\n  product = Product.new\n  product.expects(:valid?).returns(true)\n  product.expects(:save).returns(true)\n"
full_name: Mocha::ObjectMethods#expects
is_singleton: false
name: expects
params: " expects(method_name) -> expectation\n\
  expects(method_names_vs_return_values) -> last expectation\n"
visibility: public
