p>


  </div>
</div>
<div class="tags">
  
  <div class="examples">
    <h4 class="tag_title">Examples:</h4>
    
      
        <h5 class="example_title"><div class='inline'>
<p>Alternative ways to combine matchers with a logical AND.</p>
</div></h5>
      
      <pre class="example code"><code>object = mock()
object.expects(:run).with(all_of(has_key(:foo), has_key(:bar)))
object.run(foo: &#39;foovalue&#39;, bar: &#39;barvalue&#39;)

# is exactly equivalent to

object.expects(:run).with(has_key(:foo) &amp;