Skip to content
This repository has been archived by the owner on Oct 4, 2022. It is now read-only.

aflatter/tape

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tape

A rewrite of email_spec that borrows a lot but gets rid of bloat. Currently ships with the following adapters:

  • ActionMailer (:test, :active_record, :maildir)
  • Pony

Implementing your own adapter is easy. See below.

It does NOT handle Delayed::Job implicitly. Trigger your workers before checking for mail.

Compatibility

For convenience, email_spec helpers and matchers are available in the Tape::EmailSpec module. Use them if you want to migrate an existing project from email_spec to tape.

Example

require 'tape'

# This will set up your adapter
Tape.configure 'action_mailer/test'

# Get all mails
Tape.adapter.all

# Get last mail
Tape.adapter.last

# Clear mails
Tape.adapter.reset

Implementing an adapter

Adapters inherit from Tape::Adapters::Base and implement only three self-explanatory methods:

  • all
  • last
  • reset

About

A rewrite of email_spec that borrows a lot but gets rid of bloat.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages