title: Skiping callbacks during my tests
body: <p>I have the following callback 
  <code>before_action :forbid_logged_user, only: [:new, :create]</code> that basically prevent a user to access (new) the login page and submit (create) log in credentials when he's already logged in. </p>
  
  <pre><code>def forbid_logged_user
    if logged_in?
      flash[:danger] = "You're already logged in"
      redirect_to current_user
    end
  end
  </code></pre>
  
  <p>However, I have an integration test that execute a post request (create) to simulate a log in.</p>
  
  <pre><code>test "login without remembering" do
    log_in_as(@user, remember_me: '1')
    log_in_as(@user, remember_me: '0')
    assert_empty cookies['remember_token']
  end
  </code></pre>
  
  <p>As you can imagine, the post request is ignored because of the call back, therefore returning false in the test. Indeed, the test works well when the I remove the <code>before_action</code> callback for the <code>create</code> action, but I don't want to.</p>
  
  <p>How can I skip the callback only during tests? </p>
  
  <p>Thanks,</p>