Re: [Wtr-general] How to post a failed message when the assert fails

2007-04-16 Thread Bret Pettichord
vamsi wrote: > I am using this function : assert_equal(1,2) --> when i execute this > imeediatley will get the error message and stops the script execution. > > insetad of that , is there any way to post failed message like "expected 1, > but it was 2" > require 'test/unit/assertions' modul

Re: [Wtr-general] How to post a failed message when the assert fails

2007-04-13 Thread Alan Ark
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of vamsi Sent: Friday, April 13, 2007 5:35 AM To: [EMAIL PROTECTED] Subject: [Wtr-general] How to post a failed message when the assert fails Hi I am using this function : assert_equal(1,2) --> whe

Re: [Wtr-general] How to post a failed message when the assert fails

2007-04-13 Thread John Lolis
I'm noticing this question or very similar questions get posted a lot here (which means its a good question). I would search through the old posts and read what others said, there has been some very good posts on the subject. Below I'm posting a chunk of code that should help you answer your own

Re: [Wtr-general] How to post a failed message when the assert fails

2007-04-13 Thread Ċ½eljko Filipin
Hi Vamsi, Try this: irb(main):006:0> a = 1 => 1 irb(main):007:0> b = 2 => 2 irb(main):008:0> puts "expected #{a}, but it was #{b}" unless a == b expected 1, but it was 2 => nil Zeljko -- ZeljkoFilipin.com ___ Wtr-general mailing list [EMAIL PROTECTED]

[Wtr-general] How to post a failed message when the assert fails

2007-04-13 Thread vamsi
Hi I am using this function : assert_equal(1,2) --> when i execute this imeediatley will get the error message and stops the script execution. insetad of that , is there any way to post failed message like "expected 1, but it was 2" Thanks in advance. Regards Vamsi __