title: Alternate of any_number_of_times method in stubs
body: <p>I have upgraded my project to rails 4 but now I am getting some deprecation warnings and one of them is <strong>DEPRECATION: any_number_of_times is deprecated.</strong>. Code for which I am gettings this warning is</p>
  
  <pre><code>sponsorship = RSpec::Mocks::Mock.new(:sponsorship)
  
  SPONSORSHIP.should_receive(:[]).with('sponsorship').any_number_of_times.and_return(sponsorship)
  </code></pre>
  
  <p>and another scenario is </p>
  
  <pre><code>sponsorship.should_receive(:[]).with(key).any_number_of_times.and_return(value)
  </code></pre>
  
  <p>I have used stub for above code but it is not stubbing correctly. Can you find where I am doing it wrong. For stubbing I have used</p>
  
  <pre><code>SPONSORSHIP.stub(:[]).with('sponsorship').and_return(sponsorship)
  </code></pre>