Object.any_instance should_receive vs expect() to receive
There’s now a not very well documented method called expect_any_instance_of that handles the any_instance special case. You should use: expect_any_instance_of(Object).to receive(:subscribe) Google expect_any_instance_of for more info.