The HTML page is supposed to have the following code:
<div class="user-image" style="background-image:url(/images/user_image.jpg)">
How would you check for this using Capybara and RSpec?
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.
Presumably, you are trying to verify that this div uses the specified background image. I would probably do something like this:
RSpec, however, is likely the wrong tool for the job. Consider using Cucumber for tests like this.