Module: EmailSpec::Matchers
Defined Under Namespace
Classes: BccTo, CcTo, DeliverFrom, DeliverTo, EmailMatcher, HaveBodyText, HaveHeader, HaveSubject, IncludeEmailWithSubject, ReplyTo
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
permalink
.included(base) ⇒ Object
[View source]
389
390
391
392
393
394
395
|
# File 'lib/email_spec/matchers.rb', line 389
def self.included base
if base.respond_to? :register_matcher
instance_methods.each do |name|
base.register_matcher name, name
end
end
end
|
Instance Method Details
permalink
#bcc_to(*expected_email_addresses_or_objects_that_respond_to_email) ⇒ Object
[View source]
147
148
149
|
# File 'lib/email_spec/matchers.rb', line 147
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
|
permalink
#cc_to(*expected_email_addresses_or_objects_that_respond_to_email) ⇒ Object
[View source]
181
182
183
|
# File 'lib/email_spec/matchers.rb', line 181
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
|
permalink
#deliver_from(email) ⇒ Object
Also known as:
be_delivered_from
[View source]
111
112
113
|
# File 'lib/email_spec/matchers.rb', line 111
def deliver_from(email)
DeliverFrom.new(email)
end
|
permalink
#deliver_to(*expected_email_addresses_or_objects_that_respond_to_email) ⇒ Object
Also known as:
be_delivered_to
[View source]
77
78
79
|
# File 'lib/email_spec/matchers.rb', line 77
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
|
[View source]
385
386
387
|
# File 'lib/email_spec/matchers.rb', line 385
def (name, value)
HaveHeader.new(name, value)
end
|
permalink
#reply_to(email) ⇒ Object
Also known as:
have_reply_to
[View source]
41
42
43
|
# File 'lib/email_spec/matchers.rb', line 41
def reply_to(email)
ReplyTo.new(email)
end
|