Sha256: 6a69cf5f9894766f767ee286aa695ab8a03d33024b316bdd7959083acb426684
Contents?: true
Size: 685 Bytes
Versions: 4
Compression:
Stored size: 685 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe WelcomeController do describe "POST /signup (#signup)" do it "should deliver the signup email" do lambda { post :signup, "Email" => "email@example.com", "Name" => "Jimmy Bean" }.should change(ActionMailer::Base.deliveries, :size).by(1) last_delivery = ActionMailer::Base.deliveries.last last_delivery.to.should include "email@example.com" #message is now multipart, make sure both parts include Jimmy Bean last_delivery.parts[0].body.to_s.should include "Jimmy Bean" last_delivery.parts[1].body.to_s.should include "Jimmy Bean" end end end
Version data entries
4 entries across 4 versions & 1 rubygems