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.
You can test it in this way, and also not depending on the path:
Then /^I should see the image "(.+)"$/ do |image| page.should have_xpath("//img[contains(@src, \"#{image}\")]") end