You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A custom html-proofer test that makes your mailto: links awesome.
What is an awesome mailto link?
We should use awesome links as psychological warfare against users. Users will send us emails with stupid or annoying content that we don't want. At big companies (like Amazon) they have abandoned email altogether because of this reason. So instead we prefill the email with the message we want to receive. It takes active cognitive effort for the user to put in their unwanted message.
<ahref="mailto:support@pacificmedicaltraining.com?subject=Signing up&body=Hello,\nI'd like to sign up for your course, can you please send me more information.">Email us</a>
Gem::Specification.new do |s|
...
s.add_runtime_dependency 'html-proofer-mailto_awesome'
end
Create a Rakefile like the following and add it to your project
task :default => [:test]
desc 'run Rspec specs'
task :test do
sh 'rspec spec'
end
Run bundle install
Run rake
Also if you like, you can enable your project for continuous integration testing with Travis:
Set up Travis CI for your project
Add a .travis.yml file like the following to your project and your spec will run automatically
language: ruby
rvm:
- 2.5.3
For additional tests you can run on your website, see Lightning Sites and for a sample GitHub project that implements this testing and follows many other HTML development best practices, see HTML Website Template.
For a full example of a website project that includes testing continuous integration testing for awesome mailto links and many other best practices, see our