title: Testing simple STI with FactoryGirl
body: <p>I have got a class, that is the base of some other classes that specializes the behavior:</p>
  
  <pre><code>class Task &lt; ActiveRecord::Base
    attr_accessible :type, :name, :command
    validates_presence_of :type, :name, :command
  
    # some methods I would like to test
  
  end
  </code></pre>
  
  <p>The class CounterTask inherits from Task</p>
  
  <pre><code>class CounterTask &lt; Task 
  end
  </code></pre>
  
  <p>This all works fine until I am trying to test the base class, since it must have a type.</p>
  
  <pre><code>FactoryGirl.define do
    factory :task do
      sequence(:name) { |n| "name_#{n}" }
      sequence(:command) { |n|  "command_#{n}" }
    end
  end
  </code></pre>
  
  <p>How would you test the basic functionality of the superclass?</p>