Sha256: 995251698a10c5bfa318f230f92c9bac50cb5aa281fd48b4a1b259d021b98163
Contents?: true
Size: 712 Bytes
Versions: 18
Compression:
Stored size: 712 Bytes
Contents
require File.dirname(__FILE__) + '/../spec_helper' describe BasicMailer do before(:each) do ActionMailer::Base.delivery_method = :test ActionMailer::Base.perform_deliveries = true ActionMailer::Base.deliveries = [] end it "should send email" do body = 'test body' to = 'to@example.com' from = 'from@example.com' subject = 'test message' options = {:to => to, :from => from, :subject => subject, :body => body} email = BasicMailer.mail_from_params(options).deliver ActionMailer::Base.deliveries.should_not be_empty email.body.should include(body) email.to.should include(to) email.from.should include(from) email.subject.should == subject end end
Version data entries
18 entries across 18 versions & 1 rubygems