On Feb 3, 9:35 am, Ranieri Teixeira <ranieri... / gmail.com> wrote:
> One of my tests with assert_equal has the message:
>
> <5.0e-006> expected but was
> <5.0e-006>.
>
> What seems to be this error?
>
> --
> Ranieri Barros Teixeira
> Ciˇ¤cia da Computaţňo  - Faculdade de Computaţňo - Universidade Federal do
> Par(UFPA)http://rubytags.blogspot.com/

Can you post some of the code around this test?  Chances are you are
testing for equality with real numbers and it's rare that they will
ever be exactly equal.  A similar situation arises with testing time.
The time object is stored internally in milliseconds, but visually it
is displayed in seconds.  This results in failed tests with:

<10:01 AM Sun Feb 3 2008> expected but was
<10:01 AM Sub Fep 3 2008>.

The solution is to use a delta time to be used as a margin of error.

time_delta = 100
assert_in_delta time1, time2, time_delta

I used time as an example, but should work for any real numbers