Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] [TDD with run.r] Help needed please...

From: melatiah::gmx::net at: 8-May-2007 16:00

Hi All, I'm a newbie to REBOL and TDD/run.r I like the the concept of TDD. I have read through the case study by the author of run.r ( a great program) I can see how the test framework operates on the maths functions presented. But how would it be applied to functions that operate on strings or perhaps to display a button object? Perhaps its my understanding of TDD at fault, but TDD encourages testing everything to get good coverage, well ideally 100%. For example if I wrote a program that simply display a button, I should also write a test case that tests the button has indeed been displayed. Traditionally the program would be run and the appearance of the button noted - test complete. Which is all well and good until code changes then these tests should be repeated. I see where a test framework is very useful to save time and accuracy. For example, say I code a button like this: (so easy in REBOL - cool!) view layout [ button "Click Me" ] How can I code this in a way that will allow the run.r framework to operate on it? That's in advance for your time and help. Sash -- Feel free - 10 GB Mailbox, 100 FreeSMS/Monat ... Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail