title: How to mock the method calls with wildcard parameter in Rspec?
body: <p>This is my production code</p>
  
  <pre><code>def my_method
      list = [.....]
      list.each do |filename|
          content = File.read(filename)
          ...
      end
  end
  </code></pre>
  
  <p>I am writing an unit test in Rspec, so how to mock the File.read using wildcard parameter?</p>
  
  <pre><code>File.should_receive(:read).with(??some regex here).and_return ""
  </code></pre>
  
  <p>Thanks in advance!</p>