title: Factory Girl: using sequence inline vs not inline
body: <p>There are (at least?) two ways to use a sequence in factory girl:</p>
  
  <pre><code>Factory.sequence :my_id do |n|
    "#{n}"
  end
  
  Factory.define :my_object do |mo|
    mo.id        Factory.next :my_id
  end
  </code></pre>
  
  <p>and simply doing it inline:</p>
  
  <pre><code>Factory.define :my_object do |mo|
    mo.sequence(:id)    { |n| "#{n}" }
  end
  </code></pre>
  
  <p>My question is this. If I use the inline version in two different factories, will there be two different sequences that both start at 1 and increment in tandem...meaning that if I create one of each type of factory object they will both have id 1?</p>
  
  <p>If I use the externally defined sequence in two different factories am I guaranteed to get unique ids across the two objects? Meaning will the ids of each object be different?</p>
  
  <p>I am trying to confirm if the behavior above is accurate because I'm working with a completely goofy data model trying to get rspec &amp; factory girl to play nice with it. The designer of the database set things up so that different objects have to have ids generated that are unique across a set of unrelated objects. Changing the data model at this point is not a feasible solution though I'd really love to drag this stuff back onto the Rails.</p>