For a particular rails unit test(of type PerformanceTest), I need to GET a page which requires signing in the user.
my signIn function is implemented via putting the user in the cookies object:
def sign_in(user)
cookies.permanent.signed[:saved_user] = [user.id, salt]
current_user = user;
end
but when I try to call this sign_in method in unit tests and performance tests I get an error saying object “cookies” is not found. What am I doing wrong?
I eventually figured out how to fix this. In the unit test instead of calling
just call