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

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Modifies expectation so that the expected method must be called with <tt>expected_parameters</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "  object = mock()\n  object.expects(:expected_method).with(:param1, :param2)\n  object.expected_method(:param1, :param2)\n  # =&gt; verify succeeds\n\n  object = mock()\n  object.expects(:expected_method).with(:param1, :param2)\n  object.expected_method(:param3)\n  # =&gt; verify fails\n"
- !ruby/struct:SM::Flow::P 
  body: May be used with parameter matchers in Mocha::ParameterMatchers.
- !ruby/struct:SM::Flow::P 
  body: If a <tt>matching_block</tt> is given, the block is called with the parameters passed to the expected method. The expectation is matched if the block evaluates to <tt>true</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "  object = mock()\n  object.expects(:expected_method).with() { |value| value % 4 == 0 }\n  object.expected_method(16)\n  # =&gt; verify succeeds\n\n  object = mock()\n  object.expects(:expected_method).with() { |value| value % 4 == 0 }\n  object.expected_method(17)\n  # =&gt; verify fails\n"
full_name: Mocha::Expectation#with
is_singleton: false
name: with
params: " with(*expected_parameters, &matching_block) -> expectation\n"
visibility: public
