title: Issue stubbing with RSpec
body: <p>I am trying to understand why the result of these tests, the first test claims the method is not stubbed, however, the 2nd one is.</p>
  
  <pre><code>class Roll
    def initialize
      install if !installed?
    end
    def install; puts 'install'; end
  end
  
  describe Roll do
    before do
      class RollTestClass &lt; Roll; end
      RollTestClass.any_instance.stub(:install)
    end
  
    let(:roll_class) { RollTestClass }
    let(:roll) { RollTestClass.new }
  
    context 'when installed is true' do
      before do
        roll_class.any_instance.stub(:installed?).and_return(true)
      end
  
      it 'should not call install' do
        expect(roll).to_not have_received(:install)
      end
    end
  
    context 'when installed is false' do
      before do
        roll_class.any_instance.stub(:installed?).and_return(false)
      end
  
      it 'should call install' do
        expect(roll).to have_received(:install)
      end
    end
  end
  </code></pre>
  
  <p>It's also strange the error says <code>expected to have received install</code>, but I think that is likely just faulty feedback from the RSpec DSL. But maybe worth noting.</p>
  
  <pre><code>  1) Roll when installed is true should not call install
       Failure/Error: expect(roll).to_not have_received(:install)
         #&lt;RollTestClass:0x10f69ef78&gt; expected to have received install, but that method has not been stubbed.
  </code></pre>