Can you post your code in for "login"?
Here's an example... I went to google and searched "San francisco" and inspected the first link.
The link has a structure like this:
<h3 class="r">
<a href="/link">
In this case, I'd just do:
page.should have_selector('.r a')
If you're looking for a certain text within the url, you could then do:
url_text = page.find('.r a').text
url_text.should include("foo")