Rspec - combine expect_any_instance_of and a receive counts
<p>I need to verify that any instance of my class receives a certain method, but I don't care if many instances receive it (they're supposed to).</p>

<p>I tried like this:</p>

<pre><code>expect_any_instance_of(MyClass).to receive(:my_method).at_least(:once)
</code></pre>

<p>But apparently, it only allows for a single instance to receive the method multiple times, but not for different instances.</p>

<p>Is there a way to achieve that?</p>