Your point about the stub method supports Tommy's statement. This is one of those things I never like to see in specs because it always gives me the feeling there is a problem hidden somewhere.

In this case, you know $? will always be nil because you don't make the real call. It seems silly to me to use it in that case. Is there any way you can set $? as part of the setup of the spec? This is sort of like setting an instance variable on a controller when testing Rails apps. You stick in the value you want your code to react to.