@@ -9,6 +9,7 @@ module MailboxExampleGroup
9
9
require 'action_mailbox/test_helper'
10
10
extend ::ActionMailbox ::TestHelper
11
11
12
+ # @private
12
13
def self . create_inbound_email ( arg )
13
14
case arg
14
15
when Hash
@@ -34,27 +35,32 @@ def mailbox_class
34
35
subject { described_class }
35
36
end
36
37
37
- # Verify the status of any inbound email
38
+ # @api public
39
+ # Passes if the inbound email was delivered
38
40
#
39
41
# @example
40
- # describe ForwardsMailbox do
41
- # it "can describe what happened to the inbound email" do
42
- # mail = process(args)
43
- #
44
- # # can use any of:
45
- # expect(mail).to have_been_delivered
46
- # expect(mail).to have_bounced
47
- # expect(mail).to have_failed
48
- # end
49
- # end
42
+ # inbound_email = process(args)
43
+ # expect(inbound_email).to have_been_delivered
50
44
def have_been_delivered
51
45
satisfy ( 'have been delivered' , &:delivered? )
52
46
end
53
47
48
+ # @api public
49
+ # Passes if the inbound email bounced during processing
50
+ #
51
+ # @example
52
+ # inbound_email = process(args)
53
+ # expect(inbound_email).to have_bounced
54
54
def have_bounced
55
55
satisfy ( 'have bounced' , &:bounced? )
56
56
end
57
57
58
+ # @api public
59
+ # Passes if the inbound email failed to process
60
+ #
61
+ # @example
62
+ # inbound_email = process(args)
63
+ # expect(inbound_email).to have_failed
58
64
def have_failed
59
65
satisfy ( 'have failed' , &:failed? )
60
66
end
0 commit comments