Hello, I’m trying to get my Rails test suite to load fixtures in a
certain order, but I’m coming across a really strange problem.
I have two tables and a join table. Instead of creating the entries for
the join table manually, I just go
Table1.each do |t1|
Table2.each do |t2|
to create the fields. This only works if Table1 and Table2 are loaded
before the join table is loaded.
Now, when I go “rake test”, it fails on the unit tests that are
dependent on the join table having values, but the functional tests that
are dependent on them succeed. However, if I go “rake test:functionals”,
they fail. It seems like the first test suite that gets loaded does not
create these entries.
Anybody know why this might happen?