In my mailer I have a date with Spanish format: sbado, 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 /sbado,\ 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)
on 2012-07-19 14:29
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.