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
-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
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
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]
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
__