Use allow_any_instance_of instead of any_instance.should_receive