Skip to content

Commit 4a9f2a7

Browse files
committed
FIX: ActionMailbox test helper argument list
`receive_inbound_email_from_source` should accept an argument list (`*args`) instead, to allow for the `source` argument in `create_inbound_email_from_source`. ```ruby receive_inbound_email_from_source(source, status: :processing) ``` Accepting a keyword argument list (`**kwargs`) results in an `ArgumentError` ```text ArgumentError: wrong number of arguments (given 1, expected 0) ```
1 parent e485c14 commit 4a9f2a7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

actionmailbox/lib/action_mailbox/test_helper.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ def receive_inbound_email_from_fixture(*args)
2929
create_inbound_email_from_fixture(*args).tap(&:route)
3030
end
3131

32-
# Create an +InboundEmail+ from fixture using the same arguments as +create_inbound_email_from_mail+
33-
# and immediately route it to processing.
32+
# Create an +InboundEmail+ using the same arguments as +create_inbound_email_from_mail+ and immediately route it to
33+
# processing.
3434
def receive_inbound_email_from_mail(**kwargs)
3535
create_inbound_email_from_mail(**kwargs).tap(&:route)
3636
end
3737

38-
# Create an +InboundEmail+ from fixture using the same arguments as +create_inbound_email_from_source+
39-
# and immediately route it to processing.
40-
def receive_inbound_email_from_source(**kwargs)
41-
create_inbound_email_from_source(**kwargs).tap(&:route)
38+
# Create an +InboundEmail+ using the same arguments as +create_inbound_email_from_source+ and immediately route it
39+
# to processing.
40+
def receive_inbound_email_from_source(*args)
41+
create_inbound_email_from_source(*args).tap(&:route)
4242
end
4343
end
4444
end

0 commit comments

Comments
 (0)