How to assert a simple link (testing)

<%= link_to 'my_profile',:controller => 'users', :action => 'show', :id
=> current_user.id %>

<a href=‘http://localhost:3000/users/show/2’>my_profile</a>

What is the easy and simple way to assert this link in testing.

What are you trying to assert? That the correct link was generated ?
That the link corresponds to a page that exists? Something else?

Fred

That the page has a link which has href content as
http://localhost:3000/users/show/2 and the correspoding text is
'my_profile' in the html document.

assert_select/assert_tag allow you to do that (although I'd consider
this to be a bit over the top)

Fred