-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rspec feature | NoMethodError: undefined method `split' for nil:NilClass #19
Comments
Hey @zeknox, I just ran into a similar problem. Digging through the source code revealed that the Here's the relevant params you provided:
Here's the keys
etc. To be explicit, the You can explore exactly what keys are expected and how they ought to be formatted here: https://github.com/bradpauly/griddler-mailgun/blob/master/lib/griddler/mailgun/adapter.rb#L37 I spent a while wrestling with this exact same problem. I'll have a PR in to update the README, or maybe raise a specific error, depending on @bradpauly's preference. For now, I wanted to document this for others who might come here experiencing the same problem. |
I think I found the answer of the internet standards for field capitalization. From https://tools.ietf.org/html/rfc2821#section-2.4:
The "mailbox local-part" would be
Ah. RFC 822, section 3.4.7 CASE INDEPENDENCE:
To that end, I'll open up a PR that makes the keys case-insensitive. |
@josh-works sorry I haven't gotten to this yet and thanks for the update. I'll be able to give it some attention next week. |
@zeknox are you receiving a lowercase I think it might still be worth merging the PR from @josh-works, but I'm hesitant if it isn't a documented param and the change might only satisfy the test. |
Ah, I think mailgun does send an uppercase |
Hi All-
I'm trying to write a feature spec to test my email_processor.rb to simulate an email message being sent via HTTP POST request. My sample rspec looks like below:
When trying to test this spec it will throw the following error as seen below. NoMethodError: undefined method `split' for nil:NilClass
Gemfile:
gem 'griddler-mailgun'
Gemfile.lock
Any advice what I might be doing wrong or how to effectively test the email_processor.rb would be much appreciated. Cheers.
The text was updated successfully, but these errors were encountered: