title: Using rspec the ensure logger is called
body: <p>I am trying to test a controller in my rails app under a specific condition that should raise an error and log it. I got the raise test working great but I would like to make sure the logger gets called, so far I tried this, but it is not working</p>
  
  <pre><code>  it 'logs the error' do
      get 'edit', {:id =&gt; 'banana'}
      Logger.any_instance.expects(:error)
    end
  </code></pre>
  
  <p>ps i am using Mocha</p>