# Has anyone run function tests on ActionMailer?

**URL:** <https://www.ruby-forum.com/t/has-anyone-run-function-tests-on-actionmailer/85654>\
**Category:** Rails\
**Created:** [February 15, 2007, 8:59am UTC](https://www.ruby-forum.com/t/has-anyone-run-function-tests-on-actionmailer/85654 "2007-02-15T08:59:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![steveeq1](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e480ec/32.png) [@steveeq1](https://www.ruby-forum.com/u/steveeq1)\
**Post date:** [February 15, 2007, 8:59am UTC](https://www.ruby-forum.com/t/has-anyone-run-function-tests-on-actionmailer/85654/1 "2007-02-15T08:59:33Z")

</div>

I am running function tests to see if ActionMailer mails out an email.  
I have two development machines, both with rails 1.1.6. On one  
machine, the ActionMailer::Base.deliveries array resets itself after  
each test. On the other machine, the array keeps accumulating the  
emails from the previous function tests and doesn’t clear out the  
array after each test.

Both machines have identical rails (1.1.6) and the same version for  
the rails dependencies (such as activemailer). Both use ruby 1.8.4.  
Not sure if this makes a difference, but one uses Ubuntu Dapper and  
the other uses Ubuntu Edgy.

Anyone know what’s going on?

- Steve

---

<div class="post-metadata">

**Author:** ![steveeq1](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e480ec/32.png) [@steveeq1](https://www.ruby-forum.com/u/steveeq1)\
**Post date:** [February 15, 2007, 5:09pm UTC](https://www.ruby-forum.com/t/has-anyone-run-function-tests-on-actionmailer/85654/2 "2007-02-15T17:09:33Z")

</div>

On 2/14/07, Stever [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Not sure if this makes a difference, but one uses Ubuntu Dapper and  
> the other uses Ubuntu Edgy.
> 
> Anyone know what’s going on?
> 
> - Steve

Steve,

Add to the functional tests setup() method the following line:

ActionMailer::Base.deliveries.clear

–  
Zack C.  
[http://depixelate.com](http://depixelate.com)
