Sha256: 0251d883d045f5217a7a010744c2342c3b3cb1f7d4257b6c8b3a7085635b4dc0
Contents?: true
Size: 1.13 KB
Versions: 12
Compression:
Stored size: 1.13 KB
Contents
require 'spec_helper' require "email_spec" describe 'misc forklift core' do describe 'email' do include EmailSpec::Helpers include EmailSpec::Matchers it "can send mail with an email template" do plan = SpecPlan.new plan.do! { email_args = { :to => "YOU@FAKE.com", :from => "Forklift", :subject => "Forklift has moved your database", } email_variables = { :total_users_count => 10, :new_users_count => 5, } email_template = "#{File.dirname(__FILE__)}/../../template/spec_email_template.erb" @email = plan.mailer.send_template(email_args, email_template, email_variables).first } @email.should deliver_to("YOU@FAKE.com") @email.should have_subject(/Forklift has moved your database/) @email.should have_body_text(/Your forklift email/) # base @email.should have_body_text(/Total Users: 10/) # template @email.should have_body_text(/New Users: 5/) # template end it "can send mail with an attachment" do pending("how to test email attachments?") end end end
Version data entries
12 entries across 12 versions & 1 rubygems