forked from redu/redu
-
Notifications
You must be signed in to change notification settings - Fork 2
Testando ActionMailler
julianalucena edited this page Jan 22, 2011
·
3 revisions
context "Testando ActionMailer" do
before do
UserNotifier.delivery_method = :test
UserNotifier.perform_deliveries = true
UserNotifier.deliveries = []
end
it "sends a e-mail" do
mail = subject.delivery_something
UserNotifier.deliveries.size.should == 1
mail.body.should =~ /name/
end
end
http://www.rubytutorials.net/2008/02/26/small-rspec-revelations-actionmailer/