title: RSpec: how to test that a static method is called but prevent it from actually running?
body: <p>I have a static method that is doing HTTP POST to a remote server.</p>
  
  <p>I want to test that this method is called with the correct arguments whenever its needed, but I also want to prevent it from actually running so it won't execute the actual HTTP request while testing.</p>
  
  <p>how can I stub that method globally so I won't have to do it in every test case for preventing it from actually running ?
  and if doing so, how do I unstub it for the specific test case of testing the actual method ?</p>