Re: [Wtr-general] assert PASSED and FAILED

2005-08-31 Thread Ian Phillips
Hi. I have followed the documentation at http://wtr.rubyforge.org/watir_user_guide.html and I can not see why I shouldn't use assert?? Are there some rules to using assert? The thing I don't understand is that very similar code in test_logger1.rb works but mine does not. I have not worked out

RE: [Wtr-general] assert PASSED and FAILED

2005-08-31 Thread Zeljko Filipin
: [Wtr-general] assert PASSED and FAILED I have removed the incorrect and confusing examples from the user guide. Thanks for pointing out the errors: 1. if assert... never works. Assert does not return a value. 2. assert_false is actually not part of test::unit. Use assert ! instead. 3. begin/assert

begin/assert/rescue harrmful? Re: [Wtr-general] assert PASSED and FAILED

2005-08-31 Thread Chris McMahon
3. begin/assert/rescue is really a bad idea and we will stop suggesting it. I *like* begin/assert/rescue. It's my friend. Why is it a bad idea? -Chris ___ Wtr-general mailing list Wtr-general@rubyforge.org

Re: begin/assert/rescue harrmful? Re: [Wtr-general] assert PASSED and FAILED

2005-08-31 Thread Ian Phillips
For one thing I cannot get it to work. IanOn 8/31/05, Chris McMahon [EMAIL PROTECTED] wrote: 3. begin/assert/rescue is really a bad idea and we will stop suggesting it.I *like* begin/assert/rescue.It's my friend.Why is it a bad idea?-Chris___

Re: begin/assert/rescue harrmful? Re: [Wtr-general] assert PASSED and FAILED

2005-08-31 Thread Bret Pettichord
At 10:05 AM 8/31/2005, Ian Phillips wrote: For one thing I cannot get it to work. Exactly. There is no reason to explain how to throw and catch exceptions in an introduction. Also, a common coding error (which also occurs several places in watir, sigh) is to catch more exceptions than you

[Wtr-general] assert PASSED and FAILED

2005-08-30 Thread Ian Phillips
Hi. I have the following assert below. When this code is executed I get both PASSED and FAILED messages reported?? begin assert($ie.contains_text(TestGroup)) $logger.log(test_CreateGroupTest-TestGroup Found-TestGroup Found-PASSED) $logger.log_results(test_CreateGroupTest, TestGroup Found,

Re: [Wtr-general] assert PASSED and FAILED

2005-08-30 Thread Bret Pettichord
You shouldn't use assert in this situation. Instead: if $ie.contains_text(TestGroup) $logger.log(test_CreateGroupTest-TestGroup Found-TestGroup Found-PASSED) $logger.log_results(test_CreateGroupTest, TestGroup Found, TestGroup Found, PASSED) else puts(TEST FAILED. + e.message + \n