aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailbox
diff options
context:
space:
mode:
authorKyle Zhao <kzhao.sw@gmail.com>2019-04-09 00:38:50 -0400
committerKyle Zhao <kzhao.sw@gmail.com>2019-04-09 00:43:53 -0400
commit4a9f2a746e855cf9f7169c8b7ed7563422bb08d6 (patch)
tree4aaca0e370e6defb1af905022674e1e8d4a42841 /actionmailbox
parente485c14a3ee29ee486324a96545abf964d428101 (diff)
downloadrails-4a9f2a746e855cf9f7169c8b7ed7563422bb08d6.tar.gz
rails-4a9f2a746e855cf9f7169c8b7ed7563422bb08d6.tar.bz2
rails-4a9f2a746e855cf9f7169c8b7ed7563422bb08d6.zip
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) ```
Diffstat (limited to 'actionmailbox')
-rw-r--r--actionmailbox/lib/action_mailbox/test_helper.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/actionmailbox/lib/action_mailbox/test_helper.rb b/actionmailbox/lib/action_mailbox/test_helper.rb
index 0ec9152844..d248fa8734 100644
--- a/actionmailbox/lib/action_mailbox/test_helper.rb
+++ b/actionmailbox/lib/action_mailbox/test_helper.rb
@@ -29,16 +29,16 @@ module ActionMailbox
create_inbound_email_from_fixture(*args).tap(&:route)
end
- # Create an +InboundEmail+ from fixture using the same arguments as +create_inbound_email_from_mail+
- # and immediately route it to processing.
+ # Create an +InboundEmail+ using the same arguments as +create_inbound_email_from_mail+ and immediately route it to
+ # processing.
def receive_inbound_email_from_mail(**kwargs)
create_inbound_email_from_mail(**kwargs).tap(&:route)
end
- # Create an +InboundEmail+ from fixture using the same arguments as +create_inbound_email_from_source+
- # and immediately route it to processing.
- def receive_inbound_email_from_source(**kwargs)
- create_inbound_email_from_source(**kwargs).tap(&:route)
+ # Create an +InboundEmail+ using the same arguments as +create_inbound_email_from_source+ and immediately route it
+ # to processing.
+ def receive_inbound_email_from_source(*args)
+ create_inbound_email_from_source(*args).tap(&:route)
end
end
end