I have classes in my Rails project that are 'registered' with attributes read from the database. However, when I run 'rake test', the classes are loaded before the fixtures are created in SQLLite. As a result, the classes are 'registered' with null values, causing my tests to fail.
Manually testing by running my rails server works perfectly fine, so I don't think there is a problem with my code logic. Also, my fixtures are correct.
How can I change the order of loading the fixtures before the classes and models are instantiated.
rake testloads fixtures if you specifyfixtures :all. Runrake test --traceto see what happens behind the scenes. I dont think the fixtures are loaded without mentioningfixtures :allTry torake db:fixtures:loadand see if it raises any error.