Module: RSpec::Rails::MailboxExampleGroup
- Extended by:
- ActionMailbox::TestHelper, ActiveSupport::Concern
- Defined in:
- lib/rspec/rails/example/mailbox_example_group.rb
Overview
Container module for mailbox spec functionality.
Instance Method Summary collapse
-
#have_been_delivered ⇒ Object
Passes if the inbound email was delivered.
-
#have_bounced ⇒ Object
Passes if the inbound email bounced during processing.
-
#have_failed ⇒ Object
Passes if the inbound email failed to process.
-
#process(message) ⇒ ActionMaibox::InboundMessage
Process an inbound email message directly, bypassing routing.
Instance Method Details
#have_been_delivered ⇒ Object
Passes if the inbound email was delivered
44 45 46 |
# File 'lib/rspec/rails/example/mailbox_example_group.rb', line 44 def have_been_delivered satisfy('have been delivered', &:delivered?) end |
#have_bounced ⇒ Object
Passes if the inbound email bounced during processing
54 55 56 |
# File 'lib/rspec/rails/example/mailbox_example_group.rb', line 54 def have_bounced satisfy('have bounced', &:bounced?) end |
#have_failed ⇒ Object
Passes if the inbound email failed to process
64 65 66 |
# File 'lib/rspec/rails/example/mailbox_example_group.rb', line 64 def have_failed satisfy('have failed', &:failed?) end |
#process(message) ⇒ ActionMaibox::InboundMessage
Process an inbound email message directly, bypassing routing.
73 74 75 76 77 |
# File 'lib/rspec/rails/example/mailbox_example_group.rb', line 73 def process() MailboxExampleGroup.create_inbound_email().tap do |mail| self.class.mailbox_class.receive(mail) end end |