thoughtbot/factory_girl — Issue #235: Get the last sequence a second time
Author: NobbZ
Created: 2011-11-12 08:20:40+00:00
State: open

Hi I have the following factory:

```ruby
Factory.sequence :name do |n|
"User#{n}"
end

Factory.define :user do |user|
user.name "#{Factory.next(:name)}"
user.email "#{Factory.next(:name)}@example.com"
user.password "secret"
end
```

This way, user.name gets User1 and the email becomes "User2@example.com".

I would like to have a way where both are consistent and identicall. Something like "give me the same result that the last call to #next had"