module EmailSpec::Matchers

Public Class Methods

included(base) click to toggle source
# File lib/email_spec/matchers.rb, line 369
def self.included base
  if base.respond_to? :register_matcher
    instance_methods.each do |name|
      base.register_matcher name, name
    end
  end
end

Public Instance Methods

bcc_to(*expected_email_addresses_or_objects_that_respond_to_email) click to toggle source
# File lib/email_spec/matchers.rb, line 145
def bcc_to(*expected_email_addresses_or_objects_that_respond_to_email)
  BccTo.new(expected_email_addresses_or_objects_that_respond_to_email.flatten)
end
be_delivered_from(email)
Alias for: deliver_from
be_delivered_to(*expected_email_addresses_or_objects_that_respond_to_email)
Alias for: deliver_to
cc_to(*expected_email_addresses_or_objects_that_respond_to_email) click to toggle source
# File lib/email_spec/matchers.rb, line 179
def cc_to(*expected_email_addresses_or_objects_that_respond_to_email)
  CcTo.new(expected_email_addresses_or_objects_that_respond_to_email.flatten)
end
deliver_from(email) click to toggle source
# File lib/email_spec/matchers.rb, line 109
def deliver_from(email)
  DeliverFrom.new(email)
end
Also aliased as: be_delivered_from
deliver_to(*expected_email_addresses_or_objects_that_respond_to_email) click to toggle source
# File lib/email_spec/matchers.rb, line 75
def deliver_to(*expected_email_addresses_or_objects_that_respond_to_email)
  DeliverTo.new(expected_email_addresses_or_objects_that_respond_to_email.flatten)
end
Also aliased as: be_delivered_to
have_body_text(text) click to toggle source
# File lib/email_spec/matchers.rb, line 316
def have_body_text(text)
  HaveBodyText.new(text)
end
have_header(name, value) click to toggle source
# File lib/email_spec/matchers.rb, line 365
def have_header(name, value)
  HaveHeader.new(name, value)
end
have_reply_to(email)
Alias for: reply_to
have_subject(subject) click to toggle source
# File lib/email_spec/matchers.rb, line 224
def have_subject(subject)
  HaveSubject.new(subject)
end
include_email_with_subject(*emails) click to toggle source
# File lib/email_spec/matchers.rb, line 269
def include_email_with_subject(*emails)
  IncludeEmailWithSubject.new(emails.flatten.first)
end
reply_to(email) click to toggle source
# File lib/email_spec/matchers.rb, line 39
def reply_to(email)
  ReplyTo.new(email)
end
Also aliased as: have_reply_to