Search the web
Sign In
New User? Sign Up
TestFirstUserInterfaces
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Re: ActionMailer, unit testing and multipart mails   Message List  
Reply | Forward Message #1024 of 1051 |
if you commented out this line (and any other line that squawks)...

> @expected.parts << body_part # <=== ERROR HERE

and printed out the mail's parts before asserting them...

> mail = Notifier.create_notification()

p mail.parts

...what would you see?

We TDD e-mails all the time, but we don't write huge bulk assertions. Sometimes
to test_first_, we cheat a little, write the correct code, print out what it
does, and then write assertions which trap the important details.

To test-first, when you need to change a mail, you clone that test, change the
input, change the assertions to expect different output, fail the test, then
pass it in the code. This shows how cheating, especially in high-bandwidth
situations like GUIs, can lead to better TDD...

--
Phlip



Fri Dec 12, 2008 1:27 am

phlipcpp
Offline Offline
Send Email Send Email

Forward
Message #1024 of 1051 |
Expand Messages Author Sort by Date

if you commented out this line (and any other line that squawks)... ... and printed out the mail's parts before asserting them... ... p mail.parts ...what...
Phlip
phlipcpp
Offline Send Email
Dec 12, 2008
1:27 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help