views:

10

answers:

0

In Rails 3 rc testing of my controller I can't login with user from fixtures nor (:email=> '', :password =>''). The session object is created but it's user is empty.

Everything done just like in manual. And it was worked in rails 2.3.8.

I've tryed to:

require 'test_helper'
require 'authlogic/test_case'

class UsersControllerTest < ActionController::TestCase
  fixtures :all
  include Authlogic::TestCase
  setup :activate_authlogic

  context "for logged in user" do
    setup do
      UserSession.create(users(:ben))
    end
    should "show edit template" do
      get :edit
      assert_response :success
    end

No errors reported, just before_filter redirects to login page. In development mode all works fine.