Tomoharu Tsutsumi
Tomoharu Tsutsumi

Oct 28, 2020

·
1 min read

How to click a link in mail with Capybara

When you want to do “click link test in mail” with capybara, what do you do? Capybara has a very useful module for this, which is EmailSpec.

email-spec/email-spec

A collection of matchers for RSpec, MiniTest and Cucumber steps to make testing emails go smoothly. This library works…

github.com

In this module, click_email_link_matching method is prepared.

Method: EmailSpec::Helpers#click_email_link_matching

Libraries "(2.2.0) "Index " " " #click_email_link_matching

www.rubydoc.info

How to use is like below.

mail = open_email("example@gmail.com")
click_email_link_matching(/^http:/, mail) #regexp

Started LinkedIn as well!

https://www.linkedin.com/in/tomoharu-tsutsumi-56051a126/

Ruby On Rails

--

--

More from Tomoharu Tsutsumi

Recommended from Medium

James Pop

James Pop

How is Software developed at Amazon?

Windows Developer

Windows Developer

in

Windows Developer

Creating a Smart Home Device to Track Temperature and Motion

The Inquisitivists

The Inquisitivists

Software Developers And A New Kind of Labor Union

House of Analytics

House of Analytics

The Beginner’s Guide to Data Warehousing

Priyanka Barve

Priyanka Barve

CS371p Fall 2022: Priyanka Barve

Myriam

Myriam

An overview of Software Architecture Patterns

Diego Perez

Diego Perez

How to choose the right libraries?

Tupper

Tupper

in

VRChat

VRChat on Quest: Avatar Performance Woes

AboutHelpTermsPrivacy


Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Get unlimited access
Tomoharu Tsutsumi

Tomoharu Tsutsumi

19 Followers

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech