I am using Cucumber / Capybara with Rails 3 and am trying to validate the existence of an image after upload. I\'m not sure how to check the url of the image to validate it.
page.should
is now deprecated. Use instead
expect(page).to
Full example :
Then /^I should see the image "(.+)"$/ do |image| expect(page).to have_xpath("//img[contains(@src, \"#{image}\")]") end