This project is archived and is in readonly mode.

#3297 ✓resolved
Nathan Beyer

seeds.rb isn't executed within database resets run by tests

Reported by Nathan Beyer | September 28th, 2009 @ 06:47 PM

I've attempted to use the seeds.rb to setup some low-level data in the database, which my code depends upon. In this specific case, I'm setting up a reference data table that backs a model, then I'm using this model and the assumed content to perform a join in a named_scope query of another model.

My tests are failing to run, as the seed data isn't available, so when the model is loaded and the named_scope is evaluated, the reference data isn't available to fulfill the setup of the query.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages