I need to check that any instance of my class gets a specific method, but I don't care if multiple instances get it (they should).
I tried like this:
expect_any_instance_of(MyClass).to receive(:my_method).at_least(:once)
But, apparently, it allows only one instance to receive this method several times, but not for different instances.
Is there any way to achieve this?
source share