tests/test-html.rb
# This function checks that the module is displaying the correct credit score
This function checks that the module is displaying the correct credit score
This function checks that the module is displaying the correct credit score
def moduleCredits?(m, mspec)
    credit_value = m.css("div.group > aside > span.credit").text
    if Integer(credit_value) != mspec["credits"]
      add_issue("Module #{mspec["code"]} is displaying n incorrect credit value! (#{credit_value})")
    end
  end
def moduleCredits? ( m , mspec ) credit_value = m . css ( "div.group > aside > span.credit" ) . text if Integer ( credit_value ) != mspec [ "credits" ] add_issue ( "Module #{mspec["code"]} is displaying n incorrect credit value! (#{credit_value})" ) end end
This function checks that the module is displaying the correct credit score
This function checks that the module is displaying the correct credit score
m
mspec