tests/test-html.rb
# Checks to see that each year on the page has a credit counter.
Checks to see that each year on the page has a credit counter.
Checks to see that each year on the page has a credit counter .
def allCounters?(course)
    years = @html.css("div.year")
    counters = years.css("h3 > span.credit")
    if counters.length != course["modules"].length
      add_issue("Page contains an incorrect number of credit counters")
    end
  end
def allCounters? ( course ) years = @html . css ( "div.year" ) counters = years . css ( "h3 > span.credit" ) if counters . length != course [ "modules" ] . length add_issue ( "Page contains an incorrect number of credit counters" ) end end
Checks to see that each year on the page has a credit counter.
Checks to see that each year on the page has a credit counter .
course