On 7/20/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi all, > > I want to verify if the text is correctly displayed depending on > different input scenarios. The web application however rounds values, > e.g. if the calculated result is 170500 then displayed should be > 180000. > > How can i do same in Ruby/Watir?
Ruby test/unit has an assert method "assert_in_delta" that looks like it would do what you want. The code for it is in C:\ruby\lib\ruby\1.8\test\unit\assertions.rb and it's pretty easy to read if you want to see exactly how it works. Also, one of the coolest parts about Ruby is that much of Ruby is actually written in Ruby-- so if assert_in_delta doesn't do *exactly* what you want, it's pretty easy to write an assert_foo(() method that does do exactly what you want. _______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
