title: How do I exclude a global filter from testing in rails?
body: <p>I am working on an API which will have a 'before_filter :authorize_request' inside ApplicationController.  </p>
  
  <p>'authorize_request' method will do some request header validation with Signatures and HMAC validation.  However, I want to avoid calling this method before every single 'development or test' request because it means that I am going to have to mock eveerything and/or go through headaches trying to get tests to work.</p>
  
  <p>Currently, I am hacking this be saying:</p>
  
  <pre><code>if Rails.env.production?
    before_filter :authorize_request
  end
  </code></pre>
  
  <p>but that feels like a total hack.  Is there a better way to do this?</p>