testing - How to get the body of an email? -


i new testing using cucumber capybara. got application test flow is:'after submitting form, email sent user contains link app. in order access app have open mail , click link, redirect app.'. don't have access mail id. there way extract link , continue flow? have tried not working. below snippet trying:

path_regex = /(?:"https?\:\/\/.*?)(\/.*?)(?:")/ email = actionmailer::base.deliveries.last path = email.body.match(path_regex)[1] visit(path) 

its showing 'unknown error:'url' must string' error. can 1 me it?

i use mailcatcher works how you're describing.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -