You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
262 B
17 lines
262 B
module MailerMacros
|
|
def last_email
|
|
ActionMailer::Base.deliveries.last
|
|
end
|
|
|
|
def reset_email
|
|
ActionMailer::Base.deliveries = []
|
|
end
|
|
end
|
|
|
|
RSpec.configure do |config|
|
|
config.include MailerMacros
|
|
|
|
config.before(:each) do
|
|
reset_email
|
|
end
|
|
end
|
|
|