just return the conditional:

    res = send_request_raw({'uri' => '/'})
    res and res.body =~ /username = "hpsmh_anonymous"/