title: How to stub carrierwave in Rspec?
body: <p>I want to stub carrierwave to prevent it from fetch images on the web during my tests. How would I stub things to achieve this?</p>
  
  <p>My crawler parses a remote web page, and saves one image url into the model. Carrierwave will fetch that image automatically during the save operation. It works well. </p>
  
  <p>However I have a test about the parsing of pages, and every-time it will download the file, which slows down the testing.</p>
  
  <p>UPDATE:</p>
  
  <p>I mount the uploader as the following (in the pre-existing paperclip column)</p>
  
  <pre><code>mount_uploader :image, TopicImageUploader, :mount_on =&gt; :image_file_name
  </code></pre>
  
  <p>I tried to stub the following, but neither worked:</p>
  
  <pre><code>Topic.any_instance.stub(:store_image!)
  Topic.any_instance.stub(:store_image_file_name!)
  Topic.any_instance.stub(:store_image_remote_url!)
  </code></pre>