Skip to content

Commit

Permalink
Merge pull request #484 from Draiken/fix-action-mailer
Browse files Browse the repository at this point in the history
Check for ActionMailer before adding mailer hook
  • Loading branch information
luke-hill committed Oct 6, 2020
2 parents 8ebf772 + 68f73c8 commit 7b564e1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/cucumber/rails/hooks/mail.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

Before do
ActionMailer::Base.deliveries = []
if defined?(::ActionMailer)
Before do
ActionMailer::Base.deliveries = []
end
end

0 comments on commit 7b564e1

Please sign in to comment.