thoughtbot/factory_girl — pull request #338 by ricogallo (2012-04-09 16:42:27+00:00)
Title: Feature: more customizable sequences aka Arrays, Ranges and Enumerators

Hi, I needed this feature for a gem I am developing, so I was guessing why not trying to code it :-)
This feature allows to pass an Array, a Range or just an Enumerator (every kind of it) an treat it as a sequence.
I purposely did not try to monkey-patch any sort of class, or instance. Moreover, I preferred to avoid any error handling for the `StopIteration` error class, in that I suppose users looking for a custom enumerator are intentionally expecting an end. Otherwise they would build another kind of Enumerator, such as this: `(0..10).cycle`.

Thanks in advance to consider my pull request, and my best regards.

Riccardo