Rumbster – Ruby Fake Email Server

Update: Rumbster has been moved to RubyForge.On my current project, we use Watir/Test::Unit for our automated acceptance tests. Several features of the web site require emails to be generated and sent based on user input. We had a tough time fully testing these features. We needed to be able to examine the email that was generated during a test. We needed a “fake” email server.The server we were looking for needed to have the following features:

  1. Start and stop easily from the setup and teardown methods in a Ruby unit test
  2. Log received emails to a file
  3. Assert message parts (to, from, body, etc.) are what is expected

We found Dumbster and nDumbster. They both seemed to have all the features that we wanted, except we needed it to work from Ruby. I decided that it could not be that hard to write a “Dumbster” in Ruby, so I wrote it.In honor of Dumbster and Ruby, the Ruby Fake Email Server is named Rumbster. Rumbster is a simple SMTP server that receives email sent from a SMTP client. Received emails are published to observers that have registered with Rumbster.There are currently two observers; FileMailObserver and MailMessageObserver.FileMailObserver logs all published messages to a directory. The messages are logged with the name <timestamp>_<message_to>.txt.MailMessageObserver saves all published messages to a message list. The messages are parsed by TMail, creating a TMail::Mail message, before appending the message to the message list.Check out the latest version of Rumbster.svn co http://rumbster.rubyforge.org/svn/trunk/For more information on usage, read the README.

Advertisements

2 Responses

  1. […] Rumbster is a simple SMTP server that receives email sent from a SMTP client. Received emails are published to observers that have registered with Rumbster. […]

  2. […] graduated to RubyForge Posted on October 23, 2007 by Adam Esterline Thanks to Pat Courtney, Rumbster – The Fake Email Server has graduated to […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: