Is there a good way to check on existence of images and favicons using rspec and capybara?
I can check on the DOM of favicons and images, but I want to be able to ch
To test for all broken images on a page versus,
I gather all the images and check a "get" response using the following:
describe "Check for Images" do
before { visit page_path }
it "should not have broken images" do
all_images = page.all('img')
all_images.each do |img|
get img[:src]
expect(response).to be_successful
end
end
end
Hope that helps.