Sha256: 1d3fc849f57fb79173f24e892e351cbdac205935201e7160954e3c1748e4de3b
Contents?: true
Size: 1.03 KB
Versions: 3
Compression:
Stored size: 1.03 KB
Contents
require File.expand_path(File.join(File.dirname(__FILE__), '../spec_helper')) describe 'Mailer specs' do before :all do ActionMailer::Base.delivery_method = :test ActionMailer::Base.perform_deliveries = true end before :each do ActionMailer::Base.deliveries.clear end describe NormalMailer do before :each do NormalMailer.deliver_email @deliveries = ActionMailer::Base.deliveries end it "should deliver email" do @deliveries.size.should == 1 end it "should render email with partial" do @deliveries.first.body.should == "normal_mailer:email\nnormal_mailer:_partial" end end describe InheritingMailer do before :each do InheritingMailer.deliver_email @deliveries = ActionMailer::Base.deliveries end it "should deliver email" do @deliveries.size.should == 1 end it "should render email with inherited partial" do @deliveries.first.body.should == "inheriting_mailer:email\nnormal_mailer:_partial" end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
topherfangio-inherit_views-1.0.1 | spec/mailers/mailer_spec.rb |
topherfangio-inherit_views-1.0.2 | spec/mailers/mailer_spec.rb |
topherfangio-inherit_views-1.0.3 | spec/mailers/mailer_spec.rb |