On Sat, May 3, 2008 at 12:17 PM, Joe Van Dyk <[EMAIL PROTECTED]> wrote: > I occasionally get this error: > > 1) > 'A puzzle once featured, should no longer be nominated' FAILED > expected: Sun May 04 09:10:26 -0700 2008, > got: Sun May 04 09:10:26 -0700 2008 (using ==) > ./spec/models/puzzle_spec.rb:180: > > > > So, the dates looks the same to me. Any ideas for how to debug?
Just because too objects have the same to_s representation don't mean they are equal: Are these, perhaps times rather than dates? k$ irb irb(main):001:0> Time.now == Time.now => false irb(main):002:0> a, b = Time.now, Time.now => [Sat May 03 12:23:12 -0400 2008, Sat May 03 12:23:12 -0400 2008] irb(main):003:0> a == b => false This is a similar issue to Floats where there's more precision than the exernal representation shows. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/ _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users