Closed duckdalbe closed 7 years ago
I don't understand why, but I couldn't find another way to make the tests pass.
Using encrypted_mail.send(field)
also for date
resulted in this error:
Error: test: Mail::Message with encryption and signing should decrypt and check signature. (MessageTest): NoMethodError: undefined method `to_datetime'
for nil:NilClass
.../mail-gpg/.bundle/ruby/2.3.0/gems/activesupport-3.2.17/lib/active_support/core_ext/date_time/calculations.rb:141:in `<=>'
.../mail-gpg/.bundle/ruby/2.3.0/gems/mail-2.5.4/lib/mail/header.rb:165:in `=='
.../mail-gpg/.bundle/ruby/2.3.0/gems/mail-2.5.4/lib/mail/header.rb:165:in `[]='
.../mail-gpg/lib/mail/gpg.rb:143:in `block (2 levels) in decrypt_pgp_mime'
.../mail-gpg/lib/mail/gpg.rb:139:in `each'
I'll continue to fix the tests...
The errors seem a little random to me. I can't really reproduce them locally, only saw them twice but never again. And the results of travis' builds are not consistent either, please compare https://travis-ci.org/jkraemer/mail-gpg/builds/185892181 with https://travis-ci.org/jkraemer/mail-gpg/builds/186052132 — the committed code is identical!
Does anyone have any idea how to pin or fix this? I'm clueless for the moment.
I just released 0.3.0 which does not do header filtering any more.
Until there's a good solution how to deal with headers (#24) mail-gpg should copy standard headers, e.g. Date.