# Mailer\_behavior\_test

**URL:** <https://www.ruby-forum.com/t/mailer-behavior-test/75458>\
**Category:** Radiant CMS\
**Created:** [November 9, 2006, 11:54pm UTC](https://www.ruby-forum.com/t/mailer-behavior-test/75458 "2006-11-09T23:54:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Todd\_McGrath](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e19b73/32.png) [@Todd\_McGrath](https://www.ruby-forum.com/u/Todd_McGrath)\
**Post date:** [November 9, 2006, 11:54pm UTC](https://www.ruby-forum.com/t/mailer-behavior-test/75458/1 "2006-11-09T23:54:53Z")

</div>

Hi Everyone!

First post and wouldn’t you know it - it’s probably a simple, rookie,  
nuby, etc.  
type of question. I have searched and read quite a bit before posting.

Trying to debug why the mailer\_behavior isn’t working for me, so I  
thought to  
run the test that is included with it.

Is it as simple as going to the vendor/plugins/radiant\_mailer\_behavior  
directory  
and typing ‘rake’? or type ‘rake test:plugins’ from the rails app root  
dir.

In either case, I see the first line in  
vendor/plugins/radiant\_mailer\_behavior/tests/mailer\_behavior\_test.rb

require File.dirname( **FILE** ) + ‘/…/…/test\_helper’

But, I don’t have a test\_helper.rb file in vendor/plugins, so I don’t  
see how  
the test will ever work?

Todd

---

<div class="post-metadata">

**Author:** ![Todd\_McGrath](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e19b73/32.png) [@Todd\_McGrath](https://www.ruby-forum.com/u/Todd_McGrath)\
**Post date:** [November 10, 2006, 3:10pm UTC](https://www.ruby-forum.com/t/mailer-behavior-test/75458/2 "2006-11-10T15:10:22Z")

</div>

Todd,

I’m not all that familiar with the mailer behavior, but consider  
changing  
that line to read like so:

require File.join(RAILS\_ROOT, “test”, “test\_helper”)

Cheers,

Sean C.  
[seancribbs.com](http://seancribbs.com)

---

<div class="post-metadata">

**Author:** ![Todd\_McGrath](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e19b73/32.png) [@Todd\_McGrath](https://www.ruby-forum.com/u/Todd_McGrath)\
**Post date:** [November 12, 2006, 10:23pm UTC](https://www.ruby-forum.com/t/mailer-behavior-test/75458/3 "2006-11-12T22:23:38Z")

</div>

Todd McGrath wrote:

> Trying to debug why the mailer\_behavior isn’t working for me…

I too have been playing around with a non-functional mailer behavior.  
Its hard to tell for sure from the list, but the impression I get is  
that no one can get the mailer behavior to work with the latest version  
of radiant.

Sounds like people are having the same issue. Not forwarding to redirect  
page and not sending mail, and no errors of any sort reported or logged.

Changing the environment.rb file to not exclude ActionMailer DOESNT’T  
seem to fix it but has been suggested as a fix by some people on the  
list:

# Skip frameworks you’re not going to use

config.frameworks -= [:action\_web\_service, :action\_mailer]

to

# Skip frameworks you’re not going to use

config.frameworks -= [:action\_web\_service]

Please share the results from your logging and any fixes you develop.
