Forum: Ruby on Rails Testing Observers

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Doug M. (Guest)
on 2006-05-03 19:37
Greetings all,

As a Noob, I've been diligently working my way through the AWD4R book
and finally arrived at the part about observers -- which BTW I think are
very cool tech.  Anyhow, I got the Audit Observer working.  Now I want
to test it and perhaps examine it's attributes and methods to make sure
it does what is expected of it.

For example, one thing I would like to do is inspect the following line:

"observe Order, Payment, Refund"

The problem I'm having is that running unit tests against an observer
type object does not seem possible.

Has anyone out there figured out how to test observer type objects?

This topic is locked and can not be replied to.