Displaying 1 result from an estimated 1 matches for "valid_args".
Did you mean:
invalid_args
2007 Nov 04
3
Specing raising error, handling, and then not raising error
...39;t work:
it "should only increase the sent emails counter if the email was sent" do
@smtp = mock(Net::SMTP)
@smtp.should_receive(:send_message).exactly(4).times.and_return(true,
IOError, true, true)
Net::SMTP.stub!(:start).and_yield(@smtp)
@sender = Mailer::Sender.new(valid_args(:emails => @emails))
@sender.sent_emails.should == 3
end
If anyone has any pointers, that would be great.
I am using rSpec trunk - today''s release.
Mikel