thoughtbot/factory_girl — pull request #709 by nicohvi (2014-10-19 07:45:23+00:00)
Title: Detailed list syntax method

In order to add certain specific attributes for a designated amount of records, one can now specify an array of values for an attribute (in addition to the regular way of defining traits and attributes), and the first `n` records (where `n` is the length of the array) will have their specified attributes overwritten by the values in the provided array.

For instance, if one wanted to create 5 users whom all have the `admin` trait, and want to name the first *three* users `Tim`, `Frank` and `Ted`, then this could be accomplished like so:

```ruby
create_detailed_list(:user, 5, :admin, names: ['Tim', 'Frank', 'Ted'])
```

There's more detailes in the `GETTING_STARTED` document.

I've added specs for the new method, though there might be some edge cases that I have not thought of. Also, the method body of `create_detailed_list` could probably look better, but I haven't been able to think of a way to improve it.