If you are using Factory Girl, then you may be wondering how to define the factories for those has_many :through associations you have. Models The example models we will use are: class BeeKeeper < ActiveRecord::Base has_many :bees has_many :hives, :through => :bees end class Hive < ActiveRecord::Base has_many :bees has_many :bee_keepers, :through => :bees end class Bee < ActiveRecord::Base belongs