From: Brian Candler Date: 2008-08-27T18:31:59+09:00 Subject: Re: unit testing with class and floats > expected = simpleclass.new(105.234) > > assert_equal(expected, somefunction(blahblah)) Try: assert_in_delta(expected, somefunction(blahblah), 0.001) (Two floats which look the same when printed may actually be slightly different, due to the inexact nature of the internal representation)