In my mailer I have a date with Spanish format: sábado, 21 de julio del 2012 I have a custom formatter for that configured in my config/locales/es.yml my_date_format: ! ''%A, %-d de %B del %Y, %k:%M'' I''m trying to test it this way: test "date with accent" do mail = MyMailer.my_template assert_match I18n.l(@object.date, format: :my_date_format), mail.body.encoded end But it fails: # Running tests: F Finished tests in 0.438078s, 2.2827 tests/s, 15.9789 assertions/s. 1) Failure: test_date_with_accent(MyMailerTest) [test/unit/mailers/my_mailer_test.rb:12]: Expected /sábado,\ 21\ de\ julio\ del\ 2012,\ 14:10/ to match "...... .......s=C3=A1bado, 21 de julio del 2012, 14:10\r\n ........". (I have omitted the rest of the email content) -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/mBEUgqGABMQJ. For more options, visit https://groups.google.com/groups/opt_out.