I also look at the same problem. Being somewhat new to this, I'm not really sure if this will work, but I intend to try using before do
hook to trigger authentication.
Something like that:
before do get :login # fill in and submit end it "must do stuff" do #Test things and hopefully it'll be logged in end
source share