139

Tom Milewski

Testing ActionMailer with RSpec

This simple tutorial will show you how to test ActionMailer with RSpec.

Find the file ’spec/spec_helper.rb’ and place the following code into the Spec::Runner.configure method:

This will populate the deliveries array with every sent email and can be accessed in you tests like such:

Test away!

Comments are closed.

Categories

Content © Tom Milewski
Proudly powered by WordPress
Theme designed by Artisan Themes

Entries (RSS)
Comments (RSS)

19 queries.
0.372 seconds.