Factory Girl sequence fails under autospec
- by John
I have this Factory:
Factory.define :email_address do |e|
e.sequence(:address) { |n| "factory_#{n}@example.com" }
e.validated true
end
When I run my specs with rake spec, it works fine.
When I run autospec, it fails right away, claiming that the email address is being used twice in two different objects (there is a validation which restricts this).
Why is it behaving differently under autospec?
Thanks,
John