Displaying 2 results from an estimated 2 matches for "activate_authlog".
Did you mean:
activate_authlogic
2010 Nov 15
0
Problem testing Authlogic UserSession
...:Base
end
user_sessions_controller_spec.rb
require ''spec_helper''
def user_session_create
@user = Factory.create(:user)
@user_session = UserSession.create(:email => @user.email, :password =>
@user.password)
end
describe UserSessionsController do
before(:each) do
:activate_authlogic
end
describe "create a user session" do
it "creates a user session using the user credentials" do
user_session_create
@user_session.email.should == @user.email
end
end
describe "find a user session" do
it "locates the user sessi...
2011 Feb 13
0
Login user UserSession.create for rspec not working
...When I do UserSession.find.user after that in the spec the session has
been created but in the controller action the session hasn''t be set,
and therefore .current? returns false
I''ve added
require ''authlogic/test_case''
class ActionController::TestCase
setup :activate_authlogic
end
to the spec helper, based mainly on the example at
https://github.com/akm/authlogic-rspec-example
any ideas?
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh...