# Running tests on ActionMailer

**URL:** <https://www.ruby-forum.com/t/running-tests-on-actionmailer/137792>\
**Category:** Rails\
**Created:** [May 16, 2008, 1:09pm UTC](https://www.ruby-forum.com/t/running-tests-on-actionmailer/137792 "2008-05-16T13:09:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![matlin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/6a8cbe/32.png) [@matlin](https://www.ruby-forum.com/u/matlin)\
**Post date:** [May 16, 2008, 1:09pm UTC](https://www.ruby-forum.com/t/running-tests-on-actionmailer/137792/1 "2008-05-16T13:09:14Z")

</div>

I have a very strange problem, I am trying to test my mailer and as  
far as I can see the fixture mail is exactly the same as the  
generated.  
Any ideas

The first is the expected and the second is the result:

\<“Date: Fri, 16 May 2008 12:55:23 +0200\r\nFrom: **@** _**\r\nTo:  
 @\r\nSubject: =?iso-8859-1?Q?Investeringsans=f6kan?=\r  
\nContent-Type: text/plain; charset=ISO-8859-1\r\n\r\nInvesteringsans  
\366kan\n\n**_\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\n  
\n_Placering_\nFHV 8:D 006\n\n_Motivering_\nTESTDATA TESTDATA TESTDATA  
TESTDATA TESTDATA\nTESTDATA!\n\n_Belopp_\n8000\n\n_Best\344llare_  
\nMats L.\n\n_Investeringen avser_\nTESTDATA TESTDATA TESTDATA  
TESTDATA TESTDATA\nTESTDATA TESTDATA TESTDATA TESTDATA TESTDATA  
\nTESTDATA TESTDATA!\n\n_Produktinfo_\n\n  
\n\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*”\>  
\<“Date: Fri, 16 May 2008 12:55:23 +0200\r\nFrom: **@** _**\r\nTo:  
 @\r\nSubject: =?ISO-8859-1?Q?Investeringsans=f6kan?=\r  
\nContent-Type: text/plain; charset=ISO-8859-1\r\n\r\nInvesteringsans  
\366kan\n\n**_\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\n  
\n_Placering_\nFHV 8:D 006\n\n_Motivering_\nTESTDATA TESTDATA TESTDATA  
TESTDATA TESTDATA\nTESTDATA!\n\n_Belopp_\n8000\n\n_Best\344llare_  
\nMats L.\n\n_Investeringen avser_\nTESTDATA TESTDATA TESTDATA  
TESTDATA TESTDATA\nTESTDATA TESTDATA TESTDATA TESTDATA TESTDATA  
\nTESTDATA TESTDATA!\n\n_Produktinfo_\n\n  
\n\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*”\>

I removed the email addresses so that is not the issue!

---

<div class="post-metadata">

**Author:** ![matlin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/6a8cbe/32.png) [@matlin](https://www.ruby-forum.com/u/matlin)\
**Post date:** [May 16, 2008, 1:26pm UTC](https://www.ruby-forum.com/t/running-tests-on-actionmailer/137792/2 "2008-05-16T13:26:20Z")

</div>

On 16 May 2008, at 12:08, matlin wrote:

> I have a very strange problem, I am trying to test my mailer and as  
> far as I can see the fixture mail is exactly the same as the  
> generated.  
> Any ideas

No it’s not. expected has  
Subject: =?iso-8859-1  
but the actual has  
Subject: =?ISO-8859-1

Fred

---

<div class="post-metadata">

**Author:** ![matlin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/6a8cbe/32.png) [@matlin](https://www.ruby-forum.com/u/matlin)\
**Post date:** [May 16, 2008, 1:34pm UTC](https://www.ruby-forum.com/t/running-tests-on-actionmailer/137792/3 "2008-05-16T13:34:32Z")

</div>

Ah, crap, you know how you stare and stare at something and just can’t  
see it when it’s right there …

Thanks!  
/Mats

On May 16, 1:25 pm, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![matlin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/6a8cbe/32.png) [@matlin](https://www.ruby-forum.com/u/matlin)\
**Post date:** [May 16, 2008, 1:36pm UTC](https://www.ruby-forum.com/t/running-tests-on-actionmailer/137792/4 "2008-05-16T13:36:54Z")

</div>

The test passed, I have been staring at the output for two days!  
Blind as a bat I am!

Thanks again  
/Mats
