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

Version Path
muck-engine-3.5.0 test/spec/mailers/basic_mailer_spec.rb
muck-engine-3.4.0 test/spec/mailers/basic_mailer_spec.rb
muck-engine-3.3.18 test/spec/mailers/basic_mailer_spec.rb
muck-engine-3.3.17 test/spec/mailers/basic_mailer_spec.rb
muck-engine-3.3.16 test/spec/mailers/basic_mailer_spec.rb
muck-engine-3.3.15 test/spec/mailers/basic_mailer_spec.rb
muck-engine-3.3.14 test/spec/mailers/basic_mailer_spec.rb
muck-engine-3.3.13 test/spec/mailers/basic_mailer_spec.rb
muck-engine-3.3.12 test/spec/mailers/basic_mailer_spec.rb
muck-engine-3.3.11 test/spec/mailers/basic_mailer_spec.rb
muck-engine-3.3.10 test/spec/mailers/basic_mailer_spec.rb
muck-engine-3.3.6 test/spec/mailers/basic_mailer_spec.rb
muck-engine-3.0.8 test/rails_test/spec/mailers/basic_mailer_spec.rb
muck-engine-3.0.7 test/rails_test/spec/mailers/basic_mailer_spec.rb
muck-engine-3.0.6 test/rails_test/spec/mailers/basic_mailer_spec.rb
muck-engine-3.0.5 test/rails_test/spec/mailers/basic_mailer_spec.rb
muck-engine-3.0.4 test/rails_test/spec/mailers/basic_mailer_spec.rb
muck-engine-3.0.3 test/rails_test/spec/mailers/basic_mailer_spec.rb