I'm trying to use TestCase module of Authlogic to log in to my app in tests. The only sensible article describing that I can find is this one. So, I've copied require "authlogic/test_case"
to my test_helper.rb
and next wrote my test like this:
test "should get edit" do
setup :activate_authlogic
UserSession.create(users(:one))
get edit_service_url(@service)
assert_response :success
end
But I get this error on setup :activate_authlogic
line:
ArgumentError: wrong number of arguments (given 1, expected 0)
What am I doing wrong? How can I fix it?
Aucun commentaire:
Enregistrer un commentaire