I am new to BDD and I have this controller that requires a user session how can I test that in RSpec? Thank You!
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could directly set the required key in the
sessionvariable which is used for verifying that the user session is set. From the RSpec documentation you can access the session variable usingsessionlike in Rails.