Last active
January 26, 2018 07:04
-
-
Save ClayShentrup/c818d6b445ede9a1b09fd91d0a412721 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
before(:each) do | |
ENV['SITE_DOMAIN'] = 'periscopedata.com' | |
end | |
after(:each) do | |
ENV.delete('SITE_DOMAIN') | |
ActionMailer::Base.deliveries.clear | |
end | |
def send_queued_mail_and_expect_subject_to_be(expected_subject) | |
expect(Delayed::Job.count).to eq(1) | |
Delayed::Job.first.invoke_job | |
mail = ActionMailer::Base.deliveries.last | |
expect(mail.to).to eq(['engineering+"[email protected]"@periscopedata.com']) | |
expect(mail.from).to eq(['[email protected]']) | |
expect(mail.subject.include?(expected_subject)).to be(true) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment