title: Share traits across different factories
body: <p>I have many models which can be authorable (have an author field) and/or tenancyable (have a tenant field). So, I wrote concerns for both of them.</p>
  
  <p>The problem is in tests. I had used the <code>shared_examples_for</code> block to write tests for the concerns and include them into my model tests. Anyway, to do this, I have several traits and after blocks, for example:</p>
  
  <pre><code>after(:build) do |authorable|
    authorable.author = build(:user, tenant: authorable.tenant)
  end
  
  trait :no_author do
    after(:build) do |authorable|
      authorable.author = nil
    end
  end
  
  trait :no_tenant do
    tenant nil
  end
  </code></pre>
  
  <p>This piece of code should be equal in the factories of all the models that are tenancyable and authorable.</p>
  
  <p>I didn't found any way to do this. Is it possible?</p>