title: Changing mocha default expects exactly once
body: <p>I just started using mocha and I find it annoying that when creating a new mock object, mocha expects it to be called exactly once. I have helper methods to generate my mocks and I'm doing something like this</p>
  
  <pre><code>my_mock = mock(HashOfParameters)
  </code></pre>
  
  <p>All of the parameters might not get called for each test method so it will raise an error:</p>
  
  <blockquote>
    <p>expected exactly once, not yet invoked</p>
  </blockquote>
  
  <p>So I figured I needed to do something like this:</p>
  
  <pre><code>my_mock = mock()
  HashOfParameters.each do |k, v|
    my_mock.expects(k).returns(v).at_least(0)
  end
  </code></pre>
  
  <p>This works but I was wondering if there was an easier way to do this, like changing a default configuration somewhere...</p>