tests/test-html.rb
def correctTitle?(course)
    title = @html.css('div.wrapper h1').text

    if blank?(title)
      add_issue("Page is missing the course name as a title")
    elsif title != course["name"]
      add_issue("Page is not displaying the correct course title")
    end
  end
# This is the first of the test functions. Quite simple, it just checks
# if the title of the page has a title and that it matches the course name as
# per the yaml data
This is the first of the test functions. Quite simple, it just checks
if the title of the page has a title and that it matches the course name as
per the yaml data
This is the first of the test functions . Quite simple it just checks if the title of the page has a title and that it matches the course name as per the yaml data
def correctTitle?(course)
    title = @html.css('div.wrapper h1').text
    if blank?(title)
      add_issue("Page is missing the course name as a title")
    elsif title != course["name"]
      add_issue("Page is not displaying the correct course title")
    end
  end
def correctTitle? ( course ) title = @html . css ( 'div.wrapper h1' ) . text if blank? ( title ) add_issue ( "Page is missing the course name as a title" ) elsif title != course [ "name" ] add_issue ( "Page is not displaying the correct course title" ) end end
This is the first of the test functions.
This is the first of the test functions .
course