A
Adam Akhtar
Hi there
im learning unit testing and have just recently started using classes
(very basic no superclass etc) and now running into problems.
I have a function which returns a class ojbect that contains float
variables.
The assert_equal is constantly failing. However when it prints out a
summary of the two things i compared in the assert they are exaclty the
same.
So im wondering if its something to do with classes, perhaps i have to
define a method in the class which tells assert how to compare objects
of that class
or its to do with the fact there are floats in the object (i checked
previous posts and google and found out there are issues with floats and
assert)
or perhaps both.
im learning unit testing and have just recently started using classes
(very basic no superclass etc) and now running into problems.
I have a function which returns a class ojbect that contains float
variables.
The assert_equal is constantly failing. However when it prints out a
summary of the two things i compared in the assert they are exaclty the
same.
So im wondering if its something to do with classes, perhaps i have to
define a method in the class which tells assert how to compare objects
of that class
or its to do with the fact there are floats in the object (i checked
previous posts and google and found out there are issues with floats and
assert)
or perhaps both.