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

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Modifies expectation so that the number of calls to the expected method must be within a specific <tt>range</tt>.
- !ruby/struct:SM::Flow::P 
  body: <tt>range</tt> can be specified as an exact integer or as a range of integers
- !ruby/struct:SM::Flow::VERB 
  body: "  object = mock()\n  object.expects(:expected_method).times(3)\n  3.times { object.expected_method }\n  # =&gt; verify succeeds\n\n  object = mock()\n  object.expects(:expected_method).times(3)\n  2.times { object.expected_method }\n  # =&gt; verify fails\n\n  object = mock()\n  object.expects(:expected_method).times(2..4)\n  3.times { object.expected_method }\n  # =&gt; verify succeeds\n\n  object = mock()\n  object.expects(:expected_method).times(2..4)\n  object.expected_method\n  # =&gt; verify fails\n"
full_name: Mocha::Expectation#times
is_singleton: false
name: times
params: " times(range) -> expectation\n"
visibility: public
