Thank you! This is really what I was looking for. Great. I don't have to rewrite too much now. I'll give this a shot and let you know if it doesn't work out. Previous tester probably shouldn't have used that method. He used it all over the place in the old scripts, I wont use it any new ones.
Cheers! Mike -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Attebery, Bill Sent: Tuesday, July 11, 2006 3:56 PM To: [email protected] Subject: Re: [Wtr-general] assert_arrayEquals Thank you for the alternative methods. Can anyone shed some light on why it was removed in the first place? This really complicates things. I wasn't expecting all this rewriting after upgrading watir. Otherwise I would have stuck with 1.4 Mike That method appears to be in the testUnitAddons.rb file in the watir directory in 1.4 -- can't you simply do one of the following: 1- copy the method and paste it into the 1.5 testUnitAddons.rb file (assuming it exists - I can't confirm as I haven't been able to install and use 1.5 successfully yet - problems with the attach method), 2- extend the Test::Unit::Assertions module in your test file 3- simply require testUnitAddons.rb in your test files? Below is the method from Test::Unit::Assertions in testUnitAddons.rb def assert_arrayEquals(expectArray, actualArray, message = nil ) _wrap_assertion do assert_block("assert should not be called with a block.") { !block_given? } assert_equal(expectArray.length, actualArray.length, "Lengths did not match") assert_block("contents are different." ){ compareArrays( expectArray, actualArray) } end #_wrap end #def The content contained in this electronic message is not intended to constitute formation of a contract binding TWTC. TWTC will be contractually bound only upon execution, by an authorized officer, of a contract including agreed terms and conditions or by express application of its tariffs. This message is intended only for the use of the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the sender of this E-Mail or by telephone. _______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
