Module: Tape::EmailSpec::Matchers
- Defined in:
- lib/tape/email_spec/matchers.rb
Defined Under Namespace
Classes: BccTo, CcTo, DeliverFrom, DeliverTo, ReplyTo
Instance Method Summary
collapse
Instance Method Details
#bcc_to(*expected_email_addresses_or_objects_that_respond_to_email) ⇒ Object
131
132
133
|
# File 'lib/tape/email_spec/matchers.rb', line 131
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
|
#cc_to(*expected_email_addresses_or_objects_that_respond_to_email) ⇒ Object
164
165
166
|
# File 'lib/tape/email_spec/matchers.rb', line 164
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) ⇒ Object
Also known as:
be_delivered_from
96
97
98
|
# File 'lib/tape/email_spec/matchers.rb', line 96
def deliver_from(email)
DeliverFrom.new(email)
end
|
#deliver_to(*expected_email_addresses_or_objects_that_respond_to_email) ⇒ Object
Also known as:
be_delivered_to
63
64
65
|
# File 'lib/tape/email_spec/matchers.rb', line 63
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
|
232
233
234
|
# File 'lib/tape/email_spec/matchers.rb', line 232
def ()
.fields.inject({}) { |hash, field| hash[field.field.class::FIELD_NAME] = field.to_s; hash }
end
|
#reply_to(email) ⇒ Object
Also known as:
have_reply_to
29
30
31
|
# File 'lib/tape/email_spec/matchers.rb', line 29
def reply_to(email)
ReplyTo.new(email)
end
|