From: Kevin Ballard Date: 2005-10-18T22:16:58+09:00 Subject: Re: Unit testing an each function That sounds fine to me. What's wrong with that method? Actually, you don't need to build an array with each at all. IIRC, Enumerable defines to_a (I'm assuming you're including that, right?) based on each, so you can simply do something like fibSequence = FibbonacciSequence.new(9) reference = [1, 1, 2, 3, 5, 8 ,13, 21, 34] assert_equal reference, fibSequence.to_a