# frozen_string_literal: true GenericTest.pages.each do |page| links = page.links RSpec.describe "Checking broken links at #{page.url}" do links.each_with_index do |link, index| next unless link.href && !link.href.empty? it "Link (#{index}) #{link.text} to '#{link.href}' responds" do expect(Checker.link_status(link.href)).to be_between 200, 399 end end end end