[rspec-users] Date comparisons
Steve Downey
steve.downtown at gmail.com
Sat May 3 14:12:16 EDT 2008
>
> Just because too objects have the same to_s representation don't mean
> they are equal:
The important equality in this case is what matters to the tester.
>
> This is a similar issue to Floats where there's more precision than
> the exernal representation shows.
>
Is there more precision than seconds in a Time instance?
irb(main):006:0> a,b = Time.now, Time.now
=> [Sat May 03 11:06:31 -0700 2008, Sat May 03 11:06:31 -0700 2008]
irb(main):007:0> puts a.to_i, b.to_i
1209837991
1209837991
=> nil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20080503/6aee46f4/attachment.html>
More information about the rspec-users
mailing list