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

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a mock object.
- !ruby/struct:SM::Flow::P 
  body: <tt>name</tt> is a <tt>String</tt> identifier for the mock object.
- !ruby/struct:SM::Flow::P 
  body: <tt>stubbed_methods</tt> is a <tt>Hash</tt> with stubbed method name symbols as keys and corresponding return values as values.
- !ruby/struct:SM::Flow::P 
  body: <tt>block</tt> is a block to be evaluated against the mock object instance, giving an alernative way to set up expectations &amp; stubs.
- !ruby/struct:SM::Flow::P 
  body: "Note that (contrary to expectations set up by #mock) these expectations <b>need not</b> be fulfilled during the test."
- !ruby/struct:SM::Flow::VERB 
  body: "  def test_product\n    product = stub('ipod_product', :manufacturer =&gt; 'ipod', :price =&gt; 100)\n    assert_equal 'ipod', product.manufacturer\n    assert_equal 100, product.price\n    # an error will not be raised even if Product#manufacturer and Product#price have not been called\n  end\n"
full_name: Mocha::AutoVerify#stub
is_singleton: false
name: stub
params: " stub(name, &block) -> mock object\n\
  stub(stubbed_methods = {}, &block) -> mock object\n\
  stub(name, stubbed_methods = {}, &block) -> mock object\n"
visibility: public
