You need to raise if the cartridge isn't there 

    raise JenkinsNotInstalledOnServer, "There is no installed cartridge that exposes Jenkins"

and a separate one for jenkins.  Also, i would recommend

    c.name.downcase.include? "jenkins"

rather than the regex