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.
Content © Tom Milewski
Proudly powered by WordPress
Theme designed by Artisan Themes
19 queries.
0.372 seconds.