In RSpec I can easily follow the link corresponding to certain text using
click_link "change your password"
RSpec will then find the appropriate link and follow the associated HREF.
How do you do this in an email?
I'm trying to execute the same behaviour in an email using email_spec
. However I can't seem to find an equivalent helper that will click a link corresponding to particular link text in the email_spec helpers.
This seems like a pretty obvious use-case so before I write something to do it for me I wanted to check whether one already exists.
The scenario is that I want to follow whatever link in the email corresponds to "Change my password".