paulelliott/fabrication — Issue #73: Caching vs sequences
Author: icambron
Created: 2011-11-25 19:16:06+00:00
State: open

I have this code:

```ruby
require 'fabrication'

class Stuff
attr_accessor :thing
end

Fabricator(:stuff) do
puts 'called!' # printed once
thing sequence(:sequence)
end

puts Fabricate.build(:stuff).thing # => 0
puts Fabricate.build(:stuff).thing # => 0
```

Which I think ought to print 0 and 1. I guess Fabrication is caching the generated objects, but unless I'm totally misunderstanding something, that sorta defeats the purpose of sequences. Am I misunderstanding something basic here?