Devise seems to become the new authentication standard in rails land. Also the last version of the gem is for rails3, so it is very easy to start using it.

If you are using rspec2 for your tests, it is also really easy to test your controllers that are authenticated by devise.

Suppose you have a DoStuffController like this:

class DoStuffController < ApplicationController

  before_filter :authenticate_user!

  def index
  end

end

You need to test it as follows in do_stuff_controller_spec.rb:

require 'spec_helper'

describe DoStuffController do
  include Devise::TestHelpers

  before (:each) do
    @user = Factory.create(:user)
    sign_in @user
  end

  describe "GET 'index'" do
    it "should be successful" do
      get 'index'
      response.should be_success
    end
  end
end

And in your factory, users.rb:

Factory.define :user do |f|
  f.email "bla@blabla.com"
  f.password "blax123"
end

I am not testing the fact that the redirect will work, under the assumption that that is specific devise functionality which i assume to be tested and working.