Loading large amounts of text data in fixtures

Well, I never solved this, but came up with a workaround. Since I don't need these fixtures to have any association linkage I just added a method to my spec helper:

  def get_owl(name)     returning Owl.find_or_initialize_by_name(name) do |owl|       if owl.new_record?         owl.name = name         owl.body = File.read("#{RAILS_ROOT}/spec/fixtures/#{name}_owl.xml")         owl.save       end     end   end

Seems to work well enough for my needs.

Alex Wayne wrote: