fixing spec with a mock on mailer

This commit is contained in:
maxwell 2010-10-22 01:07:57 -07:00
parent 32849e693a
commit 6620f33ae2

View file

@ -95,7 +95,9 @@ describe User do
end
it 'sends an email to the receiving user' do
Notifier.should_receive(:new_request)
mail_obj = mock("mailer")
mail_obj.should_receive(:deliver)
Notifier.should_receive(:new_request).and_return(mail_obj)
user.receive @req_xml, person_one
end