From: Peter Hickman Date: 2005-10-18T18:43:40+09:00 Subject: Unit testing an each function I am testing a new class I have written that has an each method, how do I write a test for this? Build an array from the each and compare it to another array with the correct data in it or is there a cleaner way of doing this? The plus point here is that the results of the each will be a plain integer sequence.