forked from eliotsykes/rspec-rails-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
email_spec.rb
33 lines (25 loc) · 836 Bytes
/
email_spec.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Installing email_spec:
# 0. Check spec/support dir is auto-required in spec/rails_helper.rb.
#
# 1. Add email_spec to Gemfile:
#
# group :test do
# gem 'email_spec'
# end
# 2. Create a file like this one you're reading in spec/support/email_spec.rb:
require 'email_spec'
RSpec.configure do |config|
config.include EmailSpec::Helpers
config.include EmailSpec::Matchers
config.before(:each) do
reset_mailer # Clears out ActionMailer::Base.deliveries
end
end
# 3. Start making use of email_spec helpers and matchers. See specs in this project
# for examples.
# Suggested docs
# --------------
# https://github.com/bmabey/email-spec#rspec
# https://github.com/bmabey/email-spec#rspec-matchers
# http://www.rubydoc.info/gems/email_spec/EmailSpec/Helpers
# http://www.rubydoc.info/gems/email_spec/EmailSpec/Matchers