On Apr 15, 2004, at 7:37 AM, walter / mwsewall.com wrote: > >>>>>>> "w" == walter <walter / mwsewall.com> writes: >> >> w> results = Hash.new{|h,k| h[k] = 0} >> >> [...] >> >> w> expected = {} >> >> your 2 Hash are not the same : they don't use the same default value >> >> >> Guy Decoux >> >> >> > > Thanks for the response Guy, > > > I changed both hashes to be created by Hash.new{|h,k| h[k] = 0} but I > still get the error..... > [...] for a fairly simple workaround, try this line instead: assert_equal(expected.sort, @shipTo1.word_counts.sort) it will convert the hashes to an array, sort them the same way, and compare them. cheers, --Mark