Rails 3 provides a seeds.rb to load minimal set of data for production environment. However I am unable to load this set of data properly in my test environment.
I've ended up applying this answer How to load db:seed data into test database automatically?
setup :load_seeds
def load_seeds
load "#{Rails.root}/db/seeds.rb"
end
The problem is that this loads seed at every test, and this is very slow. An other problem is that this data disappears once the tests ran, so rails console does not work with my seed data.
I'm planning to migrating my seed data to fixtures later but I have not the time to do this now.
How can I only load this data once and then run my test using this seed data ?