Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/helpers/email_helpers.rb')
-rw-r--r--spec/support/helpers/email_helpers.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/support/helpers/email_helpers.rb b/spec/support/helpers/email_helpers.rb
index 9dffe035b2a..3583889d305 100644
--- a/spec/support/helpers/email_helpers.rb
+++ b/spec/support/helpers/email_helpers.rb
@@ -64,7 +64,11 @@ module EmailHelpers
def not_enqueue_mail_with(mailer_class, mail_method_name, *args)
args.map! { |arg| arg.is_a?(ActiveRecord::Base) ? arg.id : arg }
- not_enqueue_mail(mailer_class, mail_method_name).with(*args)
+
+ matcher = have_enqueued_mail(mailer_class, mail_method_name).with(*args)
+ description = proc { 'email has not been enqueued' }
+
+ RSpec::Matchers::AliasedNegatedMatcher.new(matcher, description)
end
def have_only_enqueued_mail_with_args(mailer_class, mailer_method, *args)