--- !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>expected_methods</tt> is a <tt>Hash</tt> with expected method name symbols as keys and corresponding return values as values.
- !ruby/struct:SM::Flow::P 
  body: "Note that (contrary to expectations set up by #stub) these expectations <b>must</b> be fulfilled during the test."
- !ruby/struct:SM::Flow::VERB 
  body: "  def test_product\n    product = mock('ipod_product', :manufacturer =&gt; 'ipod', :price =&gt; 100)\n    assert_equal 'ipod', product.manufacturer\n    assert_equal 100, product.price\n    # an error will be raised unless both Product#manufacturer and Product#price have been called\n  end\n"
- !ruby/struct:SM::Flow::P 
  body: <tt>block</tt> is an optional block to be evaluated against the mock object instance, giving an alernative way to set up expectations &amp; stubs.
- !ruby/struct:SM::Flow::VERB 
  body: "  def test_product\n    product = mock('ipod_product') do\n      expects(:manufacturer).returns('ipod')\n      expects(:price).returns(100)\n    end\n    assert_equal 'ipod', product.manufacturer\n    assert_equal 100, product.price\n    # an error will be raised unless both Product#manufacturer and Product#price have been called\n  end\n"
full_name: Mocha::Standalone#mock
is_singleton: false
name: mock
params: " mock(name, &block) -> mock object\n\
  mock(expected_methods = {}, &block) -> mock object\n\
  mock(name, expected_methods = {}, &block) -> mock object\n"
visibility: public
